juju: github.com/juju/juju/apiserver/common/cloudspec Index | Files

package cloudspec

import "github.com/juju/juju/apiserver/common/cloudspec"

Index

Package Files

cloudspec.go statehelpers.go

func MakeCloudSpecGetter Uses

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 Uses

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.

func MakeCloudSpecWatcherForModel Uses

func MakeCloudSpecWatcherForModel(st *state.State) func(names.ModelTag) (state.NotifyWatcher, error)

MakeCloudSpecWatcherForModel returns a function which returns a NotifyWatcher for cloud spec changes for a single model. Attempts to request a watcher for any other model other than the one associated with the given state.State results in an error.

type CloudSpecAPI Uses

type CloudSpecAPI interface {
    // WatchCloudSpecsChanges returns a watcher for cloud spec changes.
    WatchCloudSpecsChanges(args params.Entities) (params.NotifyWatchResults, error)

    // 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 Uses

func NewCloudSpec(
    resources facade.Resources,
    getCloudSpec func(names.ModelTag) (environs.CloudSpec, error),
    watchCloudSpec func(tag names.ModelTag) (state.NotifyWatcher, error),
    getAuthFunc common.GetAuthFunc,
) CloudSpecAPI

NewCloudSpec returns a new CloudSpecAPI.

type Pool Uses

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

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

Package cloudspec imports 9 packages (graph) and is imported by 44 packages. Updated 2019-09-06. Refresh now. Tools for package owners.