Documentation ¶
Index ¶
- type Plugin
- func (t *Plugin) DescribeInstances(tags map[string]string) ([]instance.Description, error)
- func (t *Plugin) Destroy(instance instance.ID) error
- func (t *Plugin) Label(instance instance.ID, labels map[string]string) error
- func (t *Plugin) Provision(spec instance.Spec) (*instance.ID, error)
- func (t *Plugin) Validate(req *types.Any) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Plugin ¶
type Plugin struct { // DoValidate performs local validation on a provision request. DoValidate func(req *types.Any) error // DoProvision creates a new instance based on the spec. DoProvision func(spec instance.Spec) (*instance.ID, error) // DoLabel labels the resource DoLabel func(instance instance.ID, labels map[string]string) error // DoDestroy terminates an existing instance. DoDestroy func(instance instance.ID) error // DoDescribeInstances returns descriptions of all instances matching all of the provided tags. DoDescribeInstances func(tags map[string]string) ([]instance.Description, error) }
Plugin implements the instance.Plugin interface and supports testing by letting user assemble behavior dyanmically.
func (*Plugin) DescribeInstances ¶
DescribeInstances returns descriptions of all instances matching all of the provided tags.
Click to show internal directories.
Click to hide internal directories.