Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComponentAction ¶
type ComponentAction string
const ( ActionCreate ComponentAction = "Create" ActionUpdate ComponentAction = "Update" ActionDelete ComponentAction = "Delete" )
type Manager ¶
type Manager interface { backend.Backend GetStatesMap() StatesMap GetState(key StateKey) *State AddState(key StateKey, state State) error UpdateState(key StateKey, state State) error DeleteState(key StateKey) error GetOutputs(key StateKey) (ResourceOutputs, error) }
Manager knows how to manage the StatesMap.
func NewManager ¶
func NewManager(stateConfig configmanager.State) (Manager, error)
NewManager returns a new Manager and reads states through backend defined in config.
type ResourceOutputs ¶ added in v0.10.0
type ResourceOutputs map[string]interface{}
type ResourceStatus ¶ added in v0.10.0
type ResourceStatus map[string]interface{}
We call what the plugin created a ResourceStatus, and which is stored as part of the state.
func (ResourceStatus) GetOutputs ¶ added in v0.10.0
func (rs ResourceStatus) GetOutputs() ResourceOutputs
func (ResourceStatus) SetOutputs ¶ added in v0.10.0
func (rs ResourceStatus) SetOutputs(outputs ResourceOutputs)
type State ¶
type State struct { Name string `yaml:"name"` InstanceID string `yaml:"instanceID"` DependsOn []string `yaml:"dependsOn"` Options configmanager.RawOptions `yaml:"options"` ResourceStatus ResourceStatus `yaml:"resourceStatus"` }
State is the single component's state.
type StateKey ¶
type StateKey string
Note: Please use the GenerateStateKeyByToolNameAndInstanceID function to generate StateKey instance.
func GenerateStateKeyByToolNameAndInstanceID ¶ added in v0.10.0
type StatesMap ¶
type StatesMap struct {
*concurrentmap.ConcurrentMap
}
func NewStatesMap ¶
func NewStatesMap() StatesMap
Click to show internal directories.
Click to hide internal directories.