Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrBlockingApps = errors.New("blocking applications running")
ErrBlockingApps is returned by Install when a listed blocking application is running: the action was skipped and recorded in the report's DeferredItems (spec R6). It is errors.Is-able so the dependency walk can cascade the deferral instead of treating it as a failure.
var ErrCanceled = errors.New("canceled by user")
ErrCanceled is returned by Install when the user withdrew the item before the run started its install or uninstall command. Nothing is recorded in the report: the item was neither attempted nor failed.
Functions ¶
This section is empty.
Types ¶
type Cancels ¶
type Cancels struct {
// contains filtered or unexported fields
}
Cancels lets the service withdraw items from managed runs that are already under way. An item can be withdrawn until a run starts its install or uninstall command; withdrawing it then aborts its download if one is in flight. A running installer command is never interrupted. The service keeps one Cancels for its lifetime and hands it to every run. A nil *Cancels withdraws nothing, which is what the command-line run uses.
func NewCancels ¶
func NewCancels() *Cancels
func (*Cancels) Cancel ¶
Cancel withdraws name. It returns false, and changes nothing, once a run has started name's install or uninstall command.
func (*Cancels) EndRun ¶
func (c *Cancels) EndRun()
EndRun forgets the finished run: its withdrawals and the items it acted on. A cancel also reverted the self-serve selection, so later runs do not pick the item up again, and an item an admin manifest also requires must not stay skipped. An operation whose run has finished is refused as finished instead.
type ProgressFn ¶
ProgressFn receives coarse per-item progress events. States emitted per item: `downloading`, `installing`/`removing`, `done`/`failed`. The service attaches an operation-scoped callback for self-service mutations.
type Runner ¶
type Runner struct {
Report *report.Report
Checker *status.Checker
Emit ProgressFn // nil = no progress events
Cancels *Cancels // nil = nothing can be withdrawn
URLPackages string
CachePath string
CheckOnly bool
}
Runner is the run-scoped install context (K7: no cross-run package globals)