Documentation
¶
Overview ¶
Package devicebackend adapts the verified blink SDK path to the executor. Ordinary effect playback uses RGB fades. The explicit Flash preset reset uses the firmware-matched Pattern operation on the owning worker.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Discover ¶
func Discover() []control.DeviceInfo
Discover reads enumeration metadata; it does not open selected devices or query firmware, and it does not imply support for every enumerated model.
func NewWithTrace ¶
func NewWithTrace(lockDir string, trace *transporttrace.Recorder) control.Driver
NewWithTrace is daemon-only opt-in diagnostics; nil preserves New behavior.
Types ¶
type OperationError ¶
OperationError retains the final native cause, the exact profile operation, and its attempt count. A successful retry does not turn a permanent failure or a failed cleanup verification into success.
func (*OperationError) Error ¶
func (e *OperationError) Error() string
func (*OperationError) Unwrap ¶
func (e *OperationError) Unwrap() error
type RetryMetrics ¶
type RetryMetrics struct {
Serial string `json:"serial"`
Operations uint64 `json:"operations"`
Attempts uint64 `json:"attempts"`
Retries uint64 `json:"retries"`
RecoveredOperations uint64 `json:"recovered_operations"`
FailedOperations uint64 `json:"failed_operations"`
ExhaustedOperations uint64 `json:"exhausted_operations"`
LastRetryOperation string `json:"last_retry_operation,omitempty"`
LastRetryError string `json:"last_retry_error,omitempty"`
LastRetryAttempt int `json:"last_retry_attempt,omitempty"`
LastRetryAt time.Time `json:"last_retry_at,omitempty"`
LastFailure string `json:"last_failure,omitempty"`
SampledAt time.Time `json:"sampled_at"`
}
RetryMetrics describes this driver's mk2 SDK calls, including calls made during firmware identification. Reopens of the same serial retain counters. Retries counts attempts actually issued after the first, not logical jobs.
func SnapshotMetrics ¶
func SnapshotMetrics(source control.Driver) []RetryMetrics
SnapshotMetrics returns a detached, serial-sorted snapshot for a driver created by New. It is safe while device workers are making native calls. Other control.Driver implementations return an empty slice.