Documentation ¶
Index ¶
- type Plugin
- func (t *Plugin) Drain(flavorProperties *types.Any, inst instance.Description) error
- func (t *Plugin) Healthy(flavorProperties *types.Any, inst instance.Description) (flavor.Health, error)
- func (t *Plugin) Prepare(flavorProperties *types.Any, spec instance.Spec, ...) (instance.Spec, error)
- func (t *Plugin) Validate(flavorProperties *types.Any, allocation group_types.AllocationMethod) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Plugin ¶
type Plugin struct { // DoValidate implements Validate via function DoValidate func(flavorProperties *types.Any, allocation group_types.AllocationMethod) error // DoPrepare implements Prepare via function DoPrepare func(flavorProperties *types.Any, spec instance.Spec, allocation group_types.AllocationMethod, index group_types.Index) (instance.Spec, error) // DoHealthy implements Healthy via function DoHealthy func(flavorProperties *types.Any, inst instance.Description) (flavor.Health, error) // DoDrain implements Drain via function DoDrain func(flavorProperties *types.Any, inst instance.Description) error }
Plugin implements flavor.Plugin and allows dynamically setting the behavior for tests
func (*Plugin) Drain ¶
Drain allows the flavor to perform a best-effort cleanup operation before the instance is destroyed.
func (*Plugin) Healthy ¶
func (t *Plugin) Healthy(flavorProperties *types.Any, inst instance.Description) (flavor.Health, error)
Healthy determines the Health of this Flavor on an instance.
func (*Plugin) Prepare ¶
func (t *Plugin) Prepare(flavorProperties *types.Any, spec instance.Spec, allocation group_types.AllocationMethod, index group_types.Index) (instance.Spec, error)
Prepare allows the Flavor to modify the provisioning instructions for an instance. For example, a helper could be used to place additional tags on the machine, or generate a specialized Init command based on the flavor configuration.
func (*Plugin) Validate ¶
func (t *Plugin) Validate(flavorProperties *types.Any, allocation group_types.AllocationMethod) error
Validate checks whether the helper can support a configuration.
Click to show internal directories.
Click to hide internal directories.