Documentation
¶
Overview ¶
Package operation runs one operation of Current, Global or the package Reconciler (the preparation of a candidate): its steps, in order, in a worker goroutine that the owner's loop starts and cancels. It decides nothing and reports nothing; the steps are closures over a per-operation state the owner keeps, so this package knows nothing of its owners.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Condition ¶
type Condition int
Condition is the condition a failing step reports on; unused by Prepare and Notify, whose failures go to the Candidate section.
type Operation ¶
type Operation struct {
Kind Kind
// Key identifies what the operation started with (the Inputs of a run or a disable), so the
// owner can tell whether a newer decision supersedes it.
Key string
// contains filtered or unexported fields
}
Operation is one operation in progress.
func Start ¶
Start runs steps in order in a new goroutine under a child of ctx and stops at the first failure; name is the package the spans carry. Non-blocking.
type Result ¶
type Result struct {
Kind Kind
Key string
// Failed is the step that failed; nil on success.
Failed *Step
Err error
// Canceled: the operation's context was cancelled when the step failed. The owner cancelled
// it, so it is not a failure.
Canceled bool
}
Result is what an operation ended with.