instance

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: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

type Plugin struct {
	// DoValidate performs local validation on a provision request.
	DoValidate func(req *types.Any) error

	// DoProvision creates a new instance based on the spec.
	DoProvision func(spec instance.Spec) (*instance.ID, error)

	// DoLabel labels the resource
	DoLabel func(instance instance.ID, labels map[string]string) error

	// DoDestroy terminates an existing instance.
	DoDestroy func(instance instance.ID) error

	// DoDescribeInstances returns descriptions of all instances matching all of the provided tags.
	DoDescribeInstances func(tags map[string]string) ([]instance.Description, error)
}

Plugin implements the instance.Plugin interface and supports testing by letting user assemble behavior dyanmically.

func (*Plugin) DescribeInstances

func (t *Plugin) DescribeInstances(tags map[string]string) ([]instance.Description, error)

DescribeInstances returns descriptions of all instances matching all of the provided tags.

func (*Plugin) Destroy

func (t *Plugin) Destroy(instance instance.ID) error

Destroy terminates an existing instance.

func (*Plugin) Label

func (t *Plugin) Label(instance instance.ID, labels map[string]string) error

Label labels the resource

func (*Plugin) Provision

func (t *Plugin) Provision(spec instance.Spec) (*instance.ID, error)

Provision creates a new instance based on the spec.

func (*Plugin) Validate

func (t *Plugin) Validate(req *types.Any) error

Validate performs local validation on a provision request.

Jump to

Keyboard shortcuts

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