juju: github.com/juju/juju/apiserver/facades/controller/remoterelations Index | Files

package remoterelations

import "github.com/juju/juju/apiserver/facades/controller/remoterelations"

Index

Package Files

remoterelations.go state.go

type RemoteRelationsAPI Uses

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

RemoteRelationsAPI provides access to the RemoteRelations API facade.

func NewRemoteRelationsAPI Uses

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 Uses

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

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

func (*RemoteRelationsAPI) ConsumeRemoteRelationChanges Uses

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 Uses

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 Uses

func (api *RemoteRelationsAPI) GetTokens(args params.GetTokenArgs) (params.StringResults, error)

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

func (*RemoteRelationsAPI) ImportRemoteEntities Uses

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 Uses

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 Uses

func (api *RemoteRelationsAPI) Relations(entities params.Entities) (params.RemoteRelationResults, error)

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

func (*RemoteRelationsAPI) RemoteApplications Uses

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 Uses

func (api *RemoteRelationsAPI) SaveMacaroons(args params.EntityMacaroonArgs) (params.ErrorResults, error)

SaveMacaroons saves the macaroons for the given entities.

func (*RemoteRelationsAPI) SetRemoteApplicationsStatus Uses

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

SetRemoteApplicationsStatus sets the status for the specified remote applications.

func (*RemoteRelationsAPI) WatchLocalRelationUnits Uses

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 Uses

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 Uses

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 Uses

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 Uses

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.

Package remoterelations imports 10 packages (graph) and is imported by 3 packages. Updated 2019-08-23. Refresh now. Tools for package owners.