runtimedevice

package
v0.0.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2026 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package device defines persistence data shared by daemon gateways and their stores.

Index

Constants

View Source
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.

View Source
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

func HashCredential(plaintext string) string

HashCredential preserves the paired runtime bearer format, including trimming whitespace appended when operators paste tokens.

Types

type ArchivedCancellationReceipt

type ArchivedCancellationReceipt struct {
	RunID    string
	Deadline time.Time
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL