Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterMachinePlugin ¶ added in v0.24.0
func RegisterMachinePlugin(plugin model.MachineConstructor) error
RegisterMachinePlugin registers a new compile time constructed machine
Types ¶
type AAgent ¶
func New ¶
func New(dir string, fw model.ChoriaProvider) (aa *AAgent, err error)
New creates a new instance of the choria autonomous agent host
func (*AAgent) AllMachineStates ¶
func (a *AAgent) AllMachineStates() (states []MachineState, err error)
AllMachineStates retrieves a list of machines and their states
func (*AAgent) ManageMachines ¶
ManageMachines start observing the source directories starting and stopping machines based on changes on disk
func (*AAgent) Transition ¶
func (a *AAgent) Transition(name string, version string, path string, id string, transition string) error
Transition transitions a running machine using a supplied transition event. Success is not guaranteed as the machine might be in a state that does not allow the transition
type MachineState ¶
type MachineState struct { Name string `json:"name" yaml:"name"` Version string `json:"version" yaml:"version"` State string `json:"state" yaml:"state"` Path string `json:"path" yaml:"path"` ID string `json:"id" yaml:"id"` StartTimeUTC int64 `json:"start_time" yaml:"start_time"` AvailableTransitions []string `json:"available_transitions" yaml:"available_transitions"` Scout bool `json:"scout" yaml:"scout"` ScoutState any `json:"current_state,omitempty" yaml:"current_state,omitempty"` }
MachineState is the state of a running machine
Click to show internal directories.
Click to hide internal directories.