group

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

Documentation

Index

Constants

View Source
const (
	// Kind is the canonical name of the plugin. Used for command line identification
	Kind = "group"

	// LookupName is the name used to look up the object via discovery
	LookupName = "group-stateless"

	// EnvPollInterval is the frequency for polling
	EnvPollInterval = "INFRAKIT_GROUP_POLL_INTERVAL"

	// EnvMaxParallelNum sets the max parallelism for creating instances
	EnvMaxParallelNum = "INFRAKIT_GROUP_MAX_PARALLEL_NUM"
)

Variables

View Source
var DefaultOptions = Options{
	PollInterval:            types.MustParseDuration(local.Getenv(EnvPollInterval, "10s")),
	MaxParallelNum:          mustParseUint(local.Getenv(EnvMaxParallelNum, "0")),
	PollIntervalGroupSpec:   types.MustParseDuration(local.Getenv(EnvPollInterval, "10s")),
	PollIntervalGroupDetail: types.MustParseDuration(local.Getenv(EnvPollInterval, "10s")),
}

DefaultOptions return an Options with default values filled in.

Functions

func Run

func Run(plugins func() discovery.Plugins, name plugin.Name,
	config *types.Any) (transport plugin.Transport, impls map[run.PluginCode]interface{}, onStop func(), err error)

Run runs the plugin, blocking the current thread. Error is returned immediately if the plugin cannot be started.

Types

type Options

type Options struct {
	// PollInterval is the frequency for syncing the state
	PollInterval types.Duration

	// MaxParallelNum is the max number of parallel instance operation. Default =0 (no limit)
	MaxParallelNum uint

	// PollIntervalGroupSpec polls for group spec at this interval to update the metadata paths
	PollIntervalGroupSpec types.Duration

	// PollIntervalGroupDetail polls for group details at this interval to update the metadata paths
	PollIntervalGroupDetail types.Duration
}

Options capture the options for starting up the group controller.

Jump to

Keyboard shortcuts

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