Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var InterfaceSpec = spi.InterfaceSpec{
Name: "Flavor",
Version: "0.1.0",
}
InterfaceSpec is the current name and version of the Flavor API.
Functions ¶
This section is empty.
Types ¶
type Health ¶
type Health int
Health is an indication of whether the Flavor is functioning properly.
type Plugin ¶
type Plugin interface {
// Validate checks whether the helper can support a configuration.
Validate(flavorProperties json.RawMessage, allocation types.AllocationMethod) 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.
Prepare(flavorProperties json.RawMessage, spec instance.Spec, allocation types.AllocationMethod) (instance.Spec, error)
// Healthy determines the Health of this Flavor on an instance.
Healthy(flavorProperties json.RawMessage, inst instance.Description) (Health, error)
// Drain allows the flavor to perform a best-effort cleanup operation before the instance is destroyed.
Drain(flavorProperties json.RawMessage, inst instance.Description) error
}
Plugin defines custom behavior for what runs on instances.
Click to show internal directories.
Click to hide internal directories.