types

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: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultSyncInterval is the default interval for syncing enrollments
	DefaultSyncInterval = 5 * time.Second
)

Variables

This section is empty.

Functions

func ResolveDependencies

func ResolveDependencies(spec types.Spec) (depends.Runnables, error)

ResolveDependencies returns a list of dependencies by parsing the opaque Properties blob.

func TemplateFrom

func TemplateFrom(source []byte) (*template.Template, error)

TemplateFrom returns a template after it has un-escapes any escape sequences

Types

type ListSourceUnion

type ListSourceUnion types.Any

ListSourceUnion is a union type of possible values: a list of []intsance.Description a group plugin name

func (*ListSourceUnion) GroupPlugin

func (u *ListSourceUnion) GroupPlugin() (plugin.Name, error)

GroupPlugin tries to 'cast' the union value as a group plugin name

func (*ListSourceUnion) InstanceDescriptions

func (u *ListSourceUnion) InstanceDescriptions() ([]instance.Description, error)

InstanceDescriptions tries to 'cast' the union as list of descriptions

func (*ListSourceUnion) MarshalJSON

func (u *ListSourceUnion) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*ListSourceUnion) UnmarshalJSON

func (u *ListSourceUnion) UnmarshalJSON(buff []byte) error

UnmarshalJSON implements json.Unmarshaler

type Options

type Options struct {

	// SourceKeySelector is a string template for selecting the join key from
	// a source instance.Description. This selector template should use escapes
	// so that the template {{ and }} are preserved.  For example,
	// SourceKeySelector: \{\{ .ID \}\}  # selects the ID field.
	SourceKeySelector string

	// SourceKeySelector is a string template for selecting the join key from
	// a enrollment plugin's instance.Description.
	EnrollmentKeySelector string

	// SyncInterval is the time interval between reconciliation. Syntax
	// is go's time.Duration string representation (e.g. 1m, 30s)
	SyncInterval types.Duration

	// DestroyOnTerminiate tells the controller to call instace.Destroy
	// for each member it is maintaining.  This is a matter of ownership
	// depending on use cases the controller may not *own* the data in the
	// downstream instance.  The controller merely reconciles it.
	DestroyOnTerminate bool
}

Options is the controller options

type PluginSpec

type PluginSpec struct {
	// Plugin is the name of the instance plugin
	Plugin plugin.Name

	// Labels are the labels to use when querying for instances. This is the namespace.
	Labels map[string]string

	// Properties is the properties to configure the instance with.
	Properties *types.Any `json:",omitempty" yaml:",omitempty"`
}

PluginSpec has information about the plugin

type Properties

type Properties struct {

	// List is a list of instance descriptions to sync
	List *ListSourceUnion `json:",omitempty" yaml:",omitempty"`

	// Instance is the name of the instance plugin which will receive the
	// synchronization messages of provision / destroy based on the
	// changes in the List
	Instance PluginSpec
}

Properties is the schema of the configuration in the types.Spec.Properties

Jump to

Keyboard shortcuts

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