Documentation ¶
Index ¶
- func MakeCloudSpecCredentialContentWatcherForModel(st *state.State) func(names.ModelTag) (state.NotifyWatcher, error)
- func MakeCloudSpecCredentialWatcherForModel(st *state.State) func(names.ModelTag) (state.NotifyWatcher, error)
- func MakeCloudSpecGetter(pool Pool) func(names.ModelTag) (environscloudspec.CloudSpec, error)
- func MakeCloudSpecGetterForModel(st *state.State) func(names.ModelTag) (environscloudspec.CloudSpec, error)
- func MakeCloudSpecWatcherForModel(st *state.State) func(names.ModelTag) (state.NotifyWatcher, error)
- type CloudSpecAPI
- type CloudSpecAPIV1
- type CloudSpecAPIV2
- type CloudSpecer
- type Pool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeCloudSpecCredentialContentWatcherForModel ¶
func MakeCloudSpecCredentialContentWatcherForModel(st *state.State) func(names.ModelTag) (state.NotifyWatcher, error)
MakeCloudSpecCredentialContentWatcherForModel returns a function which returns a NotifyWatcher for credential content 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.
func MakeCloudSpecCredentialWatcherForModel ¶
func MakeCloudSpecCredentialWatcherForModel(st *state.State) func(names.ModelTag) (state.NotifyWatcher, error)
MakeCloudSpecCredentialWatcherForModel returns a function which returns a NotifyWatcher for changes to a model's credential reference. This watch will detect when model's credential is replaced with another credential. Attempts to request a watcher for any other model other than the one associated with the given state.State results in an error.
func MakeCloudSpecGetter ¶
func MakeCloudSpecGetter(pool Pool) func(names.ModelTag) (environscloudspec.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) (environscloudspec.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 ¶
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.
Types ¶
type CloudSpecAPI ¶
type CloudSpecAPI struct {
// contains filtered or unexported fields
}
func NewCloudSpec ¶
func NewCloudSpec( resources facade.Resources, getCloudSpec func(names.ModelTag) (environscloudspec.CloudSpec, error), watchCloudSpec func(tag names.ModelTag) (state.NotifyWatcher, error), watchCloudSpecModelCredentialReference func(tag names.ModelTag) (state.NotifyWatcher, error), watchCloudSpecCredentialContent func(tag names.ModelTag) (state.NotifyWatcher, error), getAuthFunc common.GetAuthFunc, ) CloudSpecAPI
NewCloudSpec returns a new CloudSpecAPI.
func (CloudSpecAPI) CloudSpec ¶
func (s CloudSpecAPI) CloudSpec(args params.Entities) (params.CloudSpecResults, error)
CloudSpec returns the model's cloud spec.
func (CloudSpecAPI) GetCloudSpec ¶
func (s CloudSpecAPI) GetCloudSpec(tag names.ModelTag) params.CloudSpecResult
GetCloudSpec constructs the CloudSpec for a validated and authorized model.
func (CloudSpecAPI) WatchCloudSpecsChanges ¶
func (s CloudSpecAPI) WatchCloudSpecsChanges(args params.Entities) (params.NotifyWatchResults, error)
WatchCloudSpecsChanges returns a watcher for cloud spec changes.
type CloudSpecAPIV1 ¶
type CloudSpecAPIV1 struct {
CloudSpecAPIV2
}
func NewCloudSpecV1 ¶
func NewCloudSpecV1( resources facade.Resources, getCloudSpec func(names.ModelTag) (environscloudspec.CloudSpec, error), watchCloudSpec func(tag names.ModelTag) (state.NotifyWatcher, error), watchCloudSpecModelCredentialReference func(tag names.ModelTag) (state.NotifyWatcher, error), watchCloudSpecCredentialContent func(tag names.ModelTag) (state.NotifyWatcher, error), getAuthFunc common.GetAuthFunc, ) CloudSpecAPIV1
type CloudSpecAPIV2 ¶
type CloudSpecAPIV2 struct {
CloudSpecAPI
}
func NewCloudSpecV2 ¶
func NewCloudSpecV2( resources facade.Resources, getCloudSpec func(names.ModelTag) (environscloudspec.CloudSpec, error), watchCloudSpec func(tag names.ModelTag) (state.NotifyWatcher, error), watchCloudSpecModelCredentialReference func(tag names.ModelTag) (state.NotifyWatcher, error), watchCloudSpecCredentialContent func(tag names.ModelTag) (state.NotifyWatcher, error), getAuthFunc common.GetAuthFunc, ) CloudSpecAPIV2
type CloudSpecer ¶
type CloudSpecer 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 }
CloudSpecer defines the CloudSpec api interface