flavor

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

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) (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

func (t *Plugin) Drain(flavorProperties *types.Any, inst instance.Description) error

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) (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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL