Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterDefaults ¶ added in v1.0.84
func RegisterDefaults()
RegisterDefaults wires the action names the backend enqueues. Each handler is a no-op when its post-condition already holds, which is what makes at-least-once delivery safe.
func ReportInstalledMods ¶ added in v1.0.84
func ReportInstalledMods(ctx context.Context, mods []v2.InstalledMod) error
ReportInstalledMods tells the backend what is actually on the agent's disk.
func SetClient ¶ added in v1.0.84
func SetClient(c pb.AgentTaskServiceClient)
SetClient wires the authenticated task client. It must be called before the executor starts, so a handler can never find a nil client.
Types ¶
type Executor ¶ added in v1.0.84
type Executor struct {
// contains filtered or unexported fields
}
Executor drains assignments one at a time. Serialization is the point: the backend's unique running-index guarantees it never sends a second task, and this goroutine guarantees we never start one.
func NewExecutor ¶ added in v1.0.84
func NewExecutor(client pb.AgentTaskServiceClient, ctx context.Context) *Executor
func (*Executor) DrainAndRelease ¶ added in v1.0.84
DrainAndRelease cancels the running task and hands it back to the queue without spending an attempt. A rolling restart therefore neither burns retry budget nor waits out the lease: the install resumes seconds later in the new process.
func (*Executor) RunningTask ¶ added in v1.0.84
RunningTask lets the stream client re-announce in-flight work on reconnect.
func (*Executor) Submit ¶ added in v1.0.84
func (e *Executor) Submit(a *pb.TaskAssignment)