Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewWaitForCommand ¶
func NewWaitForCommand() cmd.Command
NewWaitForCommand creates the wait-for supercommand and registers the subcommands that it supports.
Types ¶
type ApplicationScope ¶
type ApplicationScope struct { ApplicationInfo *params.ApplicationInfo UnitInfos map[string]*params.UnitInfo MachineInfos map[string]*params.MachineInfo // contains filtered or unexported fields }
ApplicationScope allows the query to introspect a application entity.
func MakeApplicationScope ¶
func MakeApplicationScope(ctx ScopeContext, appInfo *params.ApplicationInfo, unitInfos map[string]*params.UnitInfo, machineInfos map[string]*params.MachineInfo, ) ApplicationScope
MakeApplicationScope creates an ApplicationScope from an ApplicationInfo
func (ApplicationScope) GetIdentValue ¶
func (m ApplicationScope) GetIdentValue(name string) (query.Box, error)
GetIdentValue returns the value of the identifier in a given scope.
func (ApplicationScope) GetIdents ¶
func (m ApplicationScope) GetIdents() []string
GetIdents returns the identifiers with in a given scope.
type Callback ¶
type Callback = func(EventType)
Callback represents a way to subscribe to a given event and be called for all events and up to the implementation to filter for a given event.
type GenericScope ¶
type GenericScope struct {
// contains filtered or unexported fields
}
GenericScope allows the query to introspect an entity.
func (*GenericScope) GetIdentValue ¶
func (m *GenericScope) GetIdentValue(name string) (query.Box, error)
GetIdentValue returns the value of the identifier in a given scope.
func (*GenericScope) GetIdents ¶
func (m *GenericScope) GetIdents() []string
GetIdents returns the names of all the available idents.
func (*GenericScope) SetIdentValue ¶
func (m *GenericScope) SetIdentValue(name string, value any)
SetIdentValue sets a new ident and it's value on a given scope.
type MachineScope ¶
type MachineScope struct { MachineInfo *params.MachineInfo // contains filtered or unexported fields }
MachineScope allows the query to introspect a model entity.
func MakeMachineScope ¶
func MakeMachineScope(ctx ScopeContext, info *params.MachineInfo) MachineScope
MakeMachineScope creates an MachineScope from an MachineInfo
func (MachineScope) GetIdentValue ¶
func (m MachineScope) GetIdentValue(name string) (query.Box, error)
GetIdentValue returns the value of the identifier in a given scope.
func (MachineScope) GetIdents ¶
func (m MachineScope) GetIdents() []string
GetIdents returns the identifiers with in a given scope.
type ModelScope ¶
type ModelScope struct { ModelInfo *params.ModelUpdate ApplicationInfos map[string]*params.ApplicationInfo UnitInfos map[string]*params.UnitInfo MachineInfos map[string]*params.MachineInfo // contains filtered or unexported fields }
ModelScope allows the query to introspect a model entity.
func MakeModelScope ¶
func MakeModelScope(ctx ScopeContext, modelInfo *params.ModelUpdate, applicationInfos map[string]*params.ApplicationInfo, unitInfos map[string]*params.UnitInfo, machineInfos map[string]*params.MachineInfo, ) ModelScope
MakeModelScope creates a ModelScope from a ModelUpdate
func (ModelScope) GetIdentValue ¶
func (m ModelScope) GetIdentValue(name string) (query.Box, error)
GetIdentValue returns the value of the identifier in a given scope.
func (ModelScope) GetIdents ¶
func (m ModelScope) GetIdents() []string
GetIdents returns the identifiers with in a given scope.
type ScopeContext ¶
type ScopeContext struct {
// contains filtered or unexported fields
}
ScopeContext defines a context for a given scope.
func MakeScopeContext ¶
func MakeScopeContext() ScopeContext
func (ScopeContext) Child ¶
func (c ScopeContext) Child(entityName, name string) ScopeContext
Child creates a child context of all idents for a given context.
func (ScopeContext) RecordIdent ¶
func (c ScopeContext) RecordIdent(ident string)
RecordIdent records the witnessing of a ident.
func (ScopeContext) RecordedIdents ¶
func (c ScopeContext) RecordedIdents() []string
RecordedIdents returns the witnessed idents via a scoped context.
type ScopedBox ¶
type ScopedBox struct {
// contains filtered or unexported fields
}
ScopedBox defines a scoped box of scopes. Lifts any scope into a box to be used later on.
func NewScopedBox ¶
NewScopedBox creates a new Box value
type Strategy ¶
type Strategy struct { ClientFn func() (api.WatchAllAPI, error) Timeout time.Duration // contains filtered or unexported fields }
Strategy defines a series of instructions to run for a given wait for plan.
type StrategyFunc ¶
StrategyFunc defines a way to change the underlying strategy function that can be changed depending on the callee.
type UnitScope ¶
type UnitScope struct { UnitInfo *params.UnitInfo MachineInfos map[string]*params.MachineInfo // contains filtered or unexported fields }
UnitScope allows the query to introspect a unit entity.
func MakeUnitScope ¶
func MakeUnitScope(ctx ScopeContext, info *params.UnitInfo, machineInfos map[string]*params.MachineInfo) UnitScope
MakeUnitScope creates an UnitScope from an UnitInfo
func (UnitScope) GetIdentValue ¶
GetIdentValue returns the value of the identifier in a given scope.