remoterelations

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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RemoteRelationsAPI

type RemoteRelationsAPI struct {
	*common.ControllerConfigAPI
	// contains filtered or unexported fields
}

RemoteRelationsAPI provides access to the RemoteRelations API facade.

func NewRemoteRelationsAPI

func NewRemoteRelationsAPI(
	st RemoteRelationsState,
	controllerCfgAPI *common.ControllerConfigAPI,
	resources facade.Resources,
	authorizer facade.Authorizer,
) (*RemoteRelationsAPI, error)

NewRemoteRelationsAPI returns a new server-side RemoteRelationsAPI facade.

func NewStateRemoteRelationsAPI

func NewStateRemoteRelationsAPI(ctx facade.Context) (*RemoteRelationsAPI, error)

NewStateRemoteRelationsAPI creates a new server-side RemoteRelationsAPI facade backed by global state.

func (*RemoteRelationsAPI) ConsumeRemoteRelationChanges

func (api *RemoteRelationsAPI) ConsumeRemoteRelationChanges(
	changes params.RemoteRelationsChanges,
) (params.ErrorResults, error)

ConsumeRemoteRelationChanges consumes changes to settings originating from the remote/offering side of relations.

func (*RemoteRelationsAPI) ExportEntities

func (api *RemoteRelationsAPI) ExportEntities(entities params.Entities) (params.TokenResults, error)

ExportEntities allocates unique, remote entity IDs for the given entities in the local model.

func (*RemoteRelationsAPI) GetTokens

GetTokens returns the token associated with the entities with the given tags for the given models.

func (*RemoteRelationsAPI) ImportRemoteEntities

func (api *RemoteRelationsAPI) ImportRemoteEntities(args params.RemoteEntityTokenArgs) (params.ErrorResults, error)

ImportRemoteEntities adds entities to the remote entities collection with the specified opaque tokens.

func (*RemoteRelationsAPI) RelationUnitSettings

func (api *RemoteRelationsAPI) RelationUnitSettings(relationUnits params.RelationUnits) (params.SettingsResults, error)

RelationUnitSettings returns the relation unit settings for the given relation units in the local model.

func (*RemoteRelationsAPI) Relations

Relations returns information about the cross-model relations with the specified keys in the local model.

func (*RemoteRelationsAPI) RemoteApplications

func (api *RemoteRelationsAPI) RemoteApplications(entities params.Entities) (params.RemoteApplicationResults, error)

RemoteApplications returns the current state of the remote applications with the specified names in the local model.

func (*RemoteRelationsAPI) SaveMacaroons

SaveMacaroons saves the macaroons for the given entities.

func (*RemoteRelationsAPI) SetRemoteApplicationsStatus

func (f *RemoteRelationsAPI) SetRemoteApplicationsStatus(args params.SetStatus) (params.ErrorResults, error)

SetRemoteApplicationsStatus sets the status for the specified remote applications.

func (*RemoteRelationsAPI) WatchLocalRelationUnits

func (api *RemoteRelationsAPI) WatchLocalRelationUnits(args params.Entities) (params.RelationUnitsWatchResults, error)

WatchLocalRelationUnits starts a RelationUnitsWatcher for watching the local relation units involved in each specified relation in the local model, and returns the watcher IDs and initial values, or an error if the relation units could not be watched.

func (*RemoteRelationsAPI) WatchRemoteApplicationRelations

func (api *RemoteRelationsAPI) WatchRemoteApplicationRelations(args params.Entities) (params.StringsWatchResults, error)

WatchRemoteApplicationRelations starts a StringsWatcher for watching the relations of each specified application in the local model, and returns the watcher IDs and initial values, or an error if the services' relations could not be watched.

func (*RemoteRelationsAPI) WatchRemoteApplications

func (api *RemoteRelationsAPI) WatchRemoteApplications() (params.StringsWatchResult, error)

WatchRemoteApplications starts a strings watcher that notifies of the addition, removal, and lifecycle changes of remote applications in the model; and returns the watcher ID and initial IDs of remote applications, or an error if watching failed.

func (*RemoteRelationsAPI) WatchRemoteRelations

func (api *RemoteRelationsAPI) WatchRemoteRelations() (params.StringsWatchResult, error)

WatchRemoteRelations starts a strings watcher that notifies of the addition, removal, and lifecycle changes of remote relations in the model; and returns the watcher ID and initial IDs of remote relations, or an error if watching failed.

type RemoteRelationsState

type RemoteRelationsState interface {
	common.Backend

	// WatchRemoteApplications returns a StringsWatcher that notifies of changes to
	// the lifecycles of the remote applications in the model.
	WatchRemoteApplications() state.StringsWatcher

	// WatchRemoteApplicationRelations returns a StringsWatcher that notifies of
	// changes to the lifecycles of relations involving the specified remote
	// application.
	WatchRemoteApplicationRelations(applicationName string) (state.StringsWatcher, error)

	// WatchRemoteRelations returns a StringsWatcher that notifies of changes to
	// the lifecycles of remote relations in the model.
	WatchRemoteRelations() state.StringsWatcher

	// RemoveRemoteEntity removes the specified entity from the remote entities collection.
	RemoveRemoteEntity(entity names.Tag) error

	// SaveMacaroon saves the given macaroon for the specified entity.
	SaveMacaroon(entity names.Tag, mac *macaroon.Macaroon) error
}

RemoteRelationState provides the subset of global state required by the remote relations facade.

Jump to

Keyboard shortcuts

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