Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var InterfaceSpec = spi.InterfaceSpec{
Name: "Instance",
Version: "0.1.0",
}
InterfaceSpec is the current name and version of the Instance API.
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
type Attachment struct {
// ID is the unique identifier for the attachment.
ID string
// Type is the kind of attachment. This allows multiple attachments of different types, with the supported
// types defined by the plugin.
Type string
}
Attachment is an identifier for a resource to attach to an instance.
type Description ¶
Description contains details about an instance.
type LogicalID ¶
type LogicalID string
LogicalID is the logical identifier to associate with an instance.
type Plugin ¶
type Plugin interface {
// Validate performs local validation on a provision request.
Validate(req json.RawMessage) error
// Provision creates a new instance based on the spec.
Provision(spec Spec) (*ID, error)
// Destroy terminates an existing instance.
Destroy(instance ID) error
// DescribeInstances returns descriptions of all instances matching all of the provided tags.
DescribeInstances(tags map[string]string) ([]Description, error)
}
Plugin is a vendor-agnostic API used to create and manage resources with an infrastructure provider.
type Spec ¶
type Spec struct {
// Properties is the opaque instance plugin configuration.
Properties *json.RawMessage
// Tags are metadata that describes an instance.
Tags map[string]string
// Init is the boot script to execute when the instance is created.
Init string
// LogicalID is the logical identifier assigned to this instance, which may be absent.
LogicalID *LogicalID
// Attachments are instructions for external entities that should be attached to the instance.
Attachments []Attachment
}
Spec is a specification of an instance to be provisioned
Click to show internal directories.
Click to hide internal directories.