9 // Command is one validated device request. A driver checks ownership, access,
10 // and Expired immediately before physical work. Each batch member keeps its own
11 // metadata, expiry, and payload. The queue consumer owns these values.
15 Metadata protocol.Metadata
16 Payload protocol.ValuePayload
19 // Expired reports whether the command has no expiry or has reached it.
20 func (c Command) Expired(now time.Time) bool {
21 return c.Metadata.ExpiresAt == nil || !now.Before(*c.Metadata.ExpiresAt)