stateenvirons

package
v0.0.0-...-4bd6544 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2016 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package stateenvirons provides types and functions that interface the state and environs packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloudSpec

func CloudSpec(
	accessor state.CloudAccessor,
	cloudName, regionName string,
	credentialTag names.CloudCredentialTag,
) (environs.CloudSpec, error)

CloudSpec returns an environs.CloudSpec from a *state.State, given the cloud, region and credential names.

func GetNewPolicyFunc

func GetNewPolicyFunc(getEnviron func(*state.State) (environs.Environ, error)) state.NewPolicyFunc

GetNewPolicyFunc returns a state.NewPolicyFunc that will return a state.Policy implemented in terms of environs.Environ and related types. The provided function will be used to construct environs.Environs given a state.State.

func NewStorageProviderRegistry

func NewStorageProviderRegistry(env environs.Environ) storage.ProviderRegistry

NewStorageProviderRegistry returns a storage.ProviderRegistry that chains the provided Environ with the common storage providers.

Types

type EnvironConfigGetter

type EnvironConfigGetter struct {
	*state.State
}

EnvironConfigGetter implements environs.EnvironConfigGetter in terms of a *state.State.

func (EnvironConfigGetter) CloudSpec

func (g EnvironConfigGetter) CloudSpec(tag names.ModelTag) (environs.CloudSpec, error)

CloudSpec implements environs.EnvironConfigGetter.

type NewEnvironFunc

type NewEnvironFunc func(*state.State) (environs.Environ, error)

NewEnvironFunc defines the type of a function that, given a state.State, returns a new Environ.

func GetNewEnvironFunc

func GetNewEnvironFunc(newEnviron environs.NewEnvironFunc) NewEnvironFunc

GetNewEnvironFunc returns a NewEnvironFunc, that constructs Environs using the given environs.NewEnvironFunc.

Jump to

Keyboard shortcuts

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