mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-04-06 21:23:45 +00:00
This pulls in another slew of other packages. Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
32 lines
1017 B
Go
32 lines
1017 B
Go
package instance
|
|
|
|
import (
|
|
"github.com/docker/infrakit/pkg/spi"
|
|
"github.com/docker/infrakit/pkg/types"
|
|
)
|
|
|
|
// InterfaceSpec is the current name and version of the Instance API.
|
|
var InterfaceSpec = spi.InterfaceSpec{
|
|
Name: "Instance",
|
|
Version: "0.5.0",
|
|
}
|
|
|
|
// Plugin is a vendor-agnostic API used to create and manage resources with an infrastructure provider.
|
|
type Plugin interface {
|
|
// Validate performs local validation on a provision request.
|
|
Validate(req *types.Any) error
|
|
|
|
// Provision creates a new instance based on the spec.
|
|
Provision(spec Spec) (*ID, error)
|
|
|
|
// Label labels the instance
|
|
Label(instance ID, labels map[string]string) error
|
|
|
|
// Destroy terminates an existing instance.
|
|
Destroy(instance ID) error
|
|
|
|
// DescribeInstances returns descriptions of all instances matching all of the provided tags.
|
|
// The properties flag indicates the client is interested in receiving details about each instance.
|
|
DescribeInstances(labels map[string]string, properties bool) ([]Description, error)
|
|
}
|