google

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

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

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

	// EnvProject is the env to set the project
	EnvProject = "INFRAKIT_GOOGLE_PROJECT"

	// EnvZone is the env to set the zone
	EnvZone = "INFRAKIT_GOOGLE_ZONE"
)

Variables

View Source
var DefaultOptions = Options{
	Namespace: defaultNamespace(),
	Project:   local.Getenv(EnvProject, ""),
	Zone:      local.Getenv(EnvZone, ""),
}

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

	// Project is the GCP project
	Project string

	// Zone is the GCP zone
	Zone string
}

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