Documentation ¶
Overview ¶
Package stateenvirons provides types and functions that interface the state and environs packages.
Index ¶
- func CloudSpec(accessor state.CloudAccessor, cloudName, regionName string, ...) (environs.CloudSpec, error)
- func GetNewPolicyFunc(getEnviron func(*state.State) (environs.Environ, error)) state.NewPolicyFunc
- func NewStorageProviderRegistry(env environs.Environ) storage.ProviderRegistry
- type EnvironConfigGetter
- type NewEnvironFunc
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 ¶
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 ¶
EnvironConfigGetter implements environs.EnvironConfigGetter in terms of a *state.State.
type NewEnvironFunc ¶
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.