Files
linuxkit/vendor/github.com/docker/infrakit/pkg/spi/instance/spi.go
Rolf Neugebauer 6a29d153f5 infrakit: Move the hyperkit instance plugin into the source directory
- The tools directory ideally should not contain source code
- Removes double vendoring of packagages
- Makes it easer to hook the build into the top-level Makefile

Eventually, the plugin should be moved to the infrakit repo.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-25 13:02:45 +01:00

31 lines
899 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.3.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.
DescribeInstances(labels map[string]string) ([]Description, error)
}