Documentation
¶
Index ¶
- Constants
- Variables
- func NextAs(next *intent.Intent) func(*intent.Intent)
- func NormalizeNodeName(name string, is ...*intent.Intent)
- func Pending(wanted marker.NodeAction) func(*intent.Intent)
- func WithBusy() func(i *intent.Intent)
- func WithNodeName(name string) func(i *intent.Intent)
- func WithReset() func(i *intent.Intent)
- func WithUpdateAvailable(up ...marker.NodeUpdate) func(i *intent.Intent)
Constants ¶
View Source
const (
// NodeName is a suitable reusable NodeName that may be provided by callers.
NodeName = "intents-node"
)
Variables ¶
View Source
var ( Stabilized = ret("Stabilized", intent.Intent{ Wanted: marker.NodeActionStabilize, Active: marker.NodeActionStabilize, State: marker.NodeStateReady, }) Stabilizing = ret("Stabilizing", intent.Intent{ Wanted: marker.NodeActionStabilize, Active: marker.NodeActionStabilize, State: marker.NodeStateBusy, }) PendingStabilizing = ret("PendingStabilizing", intent.Intent{ Wanted: marker.NodeActionStabilize, Active: marker.NodeActionUnknown, State: marker.NodeStateUnknown, }) BusyRebootUpdate = ret("PendingRebootUpdate", intent.Intent{ Wanted: marker.NodeActionRebootUpdate, Active: marker.NodeActionRebootUpdate, State: marker.NodeStateBusy, }, WithUpdateAvailable()) PendingRebootUpdate = ret("PendingRebootUpdate", intent.Intent{ Wanted: marker.NodeActionRebootUpdate, Active: marker.NodeActionPrepareUpdate, State: marker.NodeStateReady, }) UpdateError = ret("UpdateError", intent.Intent{ Wanted: marker.NodeActionRebootUpdate, Active: marker.NodeActionRebootUpdate, State: marker.NodeStateError, }, WithUpdateAvailable()) UpdateSuccess = ret("UpdateSuccess", intent.Intent{ Wanted: marker.NodeActionRebootUpdate, Active: marker.NodeActionRebootUpdate, State: marker.NodeStateReady, }, WithUpdateAvailable(marker.NodeUpdateUnknown)) UpdatePrepared = ret("UpdatePrepared", intent.Intent{ Wanted: marker.NodeActionPrepareUpdate, Active: marker.NodeActionPrepareUpdate, State: marker.NodeStateReady, }, WithUpdateAvailable()) PendingPrepareUpdate = ret("PendingPrepareUpdate", intent.Intent{ Wanted: marker.NodeActionPrepareUpdate, Active: marker.NodeActionStabilize, State: marker.NodeStateReady, }, WithUpdateAvailable()) PreparingUpdate = ret("PendingPrepareUpdate", intent.Intent{ Wanted: marker.NodeActionPrepareUpdate, Active: marker.NodeActionPrepareUpdate, State: marker.NodeStateBusy, }, WithUpdateAvailable()) UpdatePerformed = ret("UpdatePerformed", intent.Intent{ Wanted: marker.NodeActionPerformUpdate, Active: marker.NodeActionPerformUpdate, State: marker.NodeStateReady, }, WithUpdateAvailable()) PerformingUpdate = ret("PerformingUpdate", intent.Intent{ Wanted: marker.NodeActionPerformUpdate, Active: marker.NodeActionPerformUpdate, State: marker.NodeStateBusy, }, WithUpdateAvailable()) PendingUpdate = ret("PendingUpdate", intent.Intent{ Wanted: marker.NodeActionPerformUpdate, Active: marker.NodeActionPrepareUpdate, State: marker.NodeStateReady, }, WithUpdateAvailable()) Unknown = ret("Unknown", intent.Intent{ Wanted: marker.NodeActionUnknown, Active: marker.NodeActionUnknown, State: marker.NodeStateUnknown, }, WithUpdateAvailable()) Reset = ret("Reset", intent.Intent{}, WithReset()) )
Functions ¶
func NormalizeNodeName ¶
NormalizeNodeName makes all provided intents' NodeName uniform for comparison or otherwise normalized expectations.
func Pending ¶
func Pending(wanted marker.NodeAction) func(*intent.Intent)
Set the intent to be pending the provided NodeAction.
func WithNodeName ¶
WithNodeName sets the intent's NodeName.
func WithUpdateAvailable ¶
func WithUpdateAvailable(up ...marker.NodeUpdate) func(i *intent.Intent)
WithUpdateAvailable marks the intent with the provided NodeUpdate marker.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.