aws

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

Documentation

Index

Constants

View Source
const (
	// Kind is the canonical name of the plugin for starting up, etc.
	Kind = "aws"

	// EnvRegion is the env for aws region.  Don't set this if want auto detect.
	EnvRegion = "INFRAKIT_AWS_REGION"

	// EnvStackName is the env for stack name
	EnvStackName = "INFRAKIT_AWS_STACKNAME"

	// EnvMetadataTemplateURL is the location of the template for Metadata plugin
	EnvMetadataTemplateURL = "INFRAKIT_AWS_METADATA_TEMPLATE_URL"

	// EnvMetadataPollInterval is the env to set fo polling for metadata updates
	EnvMetadataPollInterval = "INFRAKIT_AWS_METADATA_POLL_INTERVAL"

	// EnvNamespaceTags is the env to set for namespace tags. It's k=v,...
	EnvNamespaceTags = "INFRAKIT_AWS_NAMESPACE_TAGS"

	// EnvELBNames is the name of the ELB ENV variable name for the ELB plugin.
	EnvELBNames = "INFRAKIT_AWS_ELB_NAMES"
)

Variables

View Source
var DefaultOptions = Options{
	Namespace: defaultNamespace(),
	ELBNames:  strings.Split(local.Getenv(EnvELBNames, ""), ","),
	Options: aws_metadata.Options{
		Template:  local.Getenv(EnvMetadataTemplateURL, ""),
		StackName: local.Getenv(EnvStackName, ""),
		Options: aws_instance.Options{
			Region: local.Getenv(EnvRegion, ""),
		},
		PollInterval: types.MustParseDuration(local.Getenv(EnvMetadataPollInterval, "60s")),
	},
}

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 {
	// Namespace is a set of kv pairs for tags that namespaces the resource instances
	Namespace map[string]string

	// ELBNames is a list of names for ELB instances to start the L4 plugins
	ELBNames []string

	aws_metadata.Options `json:",inline" yaml:",inline"`
}

Options capture the options for starting up the plugin.

Jump to

Keyboard shortcuts

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