Documentation
¶
Overview ¶
Package device defines persistence data shared by daemon gateways and their stores.
Index ¶
Constants ¶
const ArchivedCancellationReceiptLimit = 20 * time.Second
ArchivedCancellationReceiptLimit bounds receipt draining after an administrator archive. It is not a model/tool timeout and never restarts on heartbeat or retry.
const RuntimeTypeAgentDaemon = "agent_daemon"
RuntimeTypeAgentDaemon is the type of every device credential: the device runs the agent daemon. The gateway authenticates only this type.
Variables ¶
This section is empty.
Functions ¶
func HashCredential ¶
HashCredential preserves the paired runtime bearer format, including trimming whitespace appended when operators paste tokens.
Types ¶
type ArchivedCancellationReceipt ¶
ArchivedCancellationReceipt authorizes only the original delivery's receipt drain. It grants neither Runtime credentials nor permission to start work.
type Credential ¶
type Credential struct {
ID string
Name string
Type string
CredentialHash string
// RuntimeNodeID is the persisted managed allocation binding, never caller input.
RuntimeNodeID string
// RuntimeAllocationID distinguishes managed cloud compute from self-hosted devices.
RuntimeAllocationID string
}
Credential is the minimal device identity needed for gateway authentication. CredentialHash is never sent over the daemon protocol.
type Heartbeat ¶
type Heartbeat struct {
RuntimeID string
// CredentialHash comes from gateway authentication, never a daemon frame.
CredentialHash string
SupportedAgentKinds []proto.SupportedAgentKind
}
Heartbeat is the WebSocket daemon heartbeat payload after gateway normalization.
type HeartbeatStatus ¶
type HeartbeatStatus struct {
// Deleted is true when the heartbeat UPDATE matched zero rows,
// meaning the runtime was soft-deleted (or never existed). The
// gateway uses this to send a permanent WS close frame so the
// daemon stops reconnecting.
Deleted bool
}
HeartbeatStatus is the post-heartbeat liveness the runner uses to detect state changes.