cloudspec

package
v0.0.0-...-8ff1004 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2019 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeCloudSpecGetter

func MakeCloudSpecGetter(pool Pool) func(names.ModelTag) (environs.CloudSpec, error)

MakeCloudSpecGetter returns a function which returns a CloudSpec for a given model, using the given Pool.

func MakeCloudSpecGetterForModel

func MakeCloudSpecGetterForModel(st *state.State) func(names.ModelTag) (environs.CloudSpec, error)

MakeCloudSpecGetterForModel returns a function which returns a CloudSpec for a single model. Attempts to request a CloudSpec for any other model other than the one associated with the given state.State results in an error.

Types

type CloudSpecAPI

type CloudSpecAPI interface {
	// CloudSpec returns the model's cloud spec.
	CloudSpec(args params.Entities) (params.CloudSpecResults, error)

	// GetCloudSpec constructs the CloudSpec for a validated and authorized model.
	GetCloudSpec(tag names.ModelTag) params.CloudSpecResult
}

CloudSpecAPI implements common methods for use by various facades for querying the cloud spec of models.

func NewCloudSpec

func NewCloudSpec(
	getCloudSpec func(names.ModelTag) (environs.CloudSpec, error),
	getAuthFunc common.GetAuthFunc,
) CloudSpecAPI

NewCloudSpec returns a new CloudSpecAPI.

type Pool

type Pool interface {
	Get(string) (*state.PooledState, error)
}

Pool describes an interface for retrieving State instances from a collection.

Jump to

Keyboard shortcuts

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