internal

package
v0.0.0-...-a355528 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base struct {
	Plugins          func() discovery.Plugins
	Choices          []selector.Choice
	SelectFunc       func(instance.Spec, []selector.Choice, func(selector.Choice) instance.Plugin) (selector.Choice, error)
	PluginClientFunc func(plugin.Name) (instance.Plugin, error)
}

Base is the base implementation of an instance plugin

func (*Base) DescribeInstances

func (b *Base) DescribeInstances(tags map[string]string, properties bool) ([]instance.Description, error)

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

func (*Base) Destroy

func (b *Base) Destroy(inst instance.ID, context instance.Context) error

Destroy terminates an existing instance.

func (*Base) Init

func (b *Base) Init() *Base

Init initializes the base by setting any unset properties with defaults

func (*Base) Label

func (b *Base) Label(inst instance.ID, labels map[string]string) error

Label labels the instance

func (*Base) Provision

func (b *Base) Provision(spec instance.Spec) (*instance.ID, error)

Provision creates a new instance based on the spec.

func (*Base) Validate

func (b *Base) Validate(req *types.Any) error

Validate performs local validation on a provision request.

func (*Base) VisitChoices

func (b *Base) VisitChoices(visit func(selector.Choice, instance.Plugin) (bool, error)) error

VisitChoices visits all the choices linearly one by one. If the work function returns false or error, the visit stops.

Jump to

Keyboard shortcuts

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