Documentation
¶
Overview ¶
Package rollout upgrades agents node by node (§5.0.1 step 6, §6.2): each node gets the agent binary from the controller's downloads over its agent stream, restarts into it, and must reconnect with the new version before the next node starts. A failure stops the rollout.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrRunning = errors.New("an agent rollout is already running")
ErrRunning is returned while a rollout is in progress.
var ReconnectTimeout = 3 * time.Minute
ReconnectTimeout is how long a node has to come back with the new version (longer than the agent's own rollback guard).
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func New ¶
func New(gw *agentgw.Gateway, reg *nodes.Registry, downloads, target string, log *slog.Logger) *Manager
New returns a manager rolling agents out to target (the controller's own version) from the binaries in downloads.
func (*Manager) Start ¶
Start upgrades the given nodes (all when empty) that run another version; force also re-sends to nodes already at the target.
type NodeStatus ¶
type NodeStatus struct {
NodeID string `json:"nodeId"`
Node string `json:"node"`
From string `json:"from"`
State string `json:"state"` // pending | sending | restarting | done | failed | skipped
Error string `json:"error,omitempty"`
StartedAt *time.Time `json:"startedAt,omitempty"`
FinishedAt *time.Time `json:"finishedAt,omitempty"`
}