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

package crossmodelrelations

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


Package Files

crossmodelrelations.go state.go

type CrossModelRelationsAPI Uses

type CrossModelRelationsAPI struct {
    // contains filtered or unexported fields

CrossModelRelationsAPI provides access to the CrossModelRelations API facade.

func NewCrossModelRelationsAPI Uses

func NewCrossModelRelationsAPI(
    st CrossModelRelationsState,
    fw firewall.State,
    resources facade.Resources,
    authorizer facade.Authorizer,
    authCtxt *commoncrossmodel.AuthContext,
    egressAddressWatcher egressAddressWatcherFunc,
    relationStatusWatcher relationStatusWatcherFunc,
    offerStatusWatcher offerStatusWatcherFunc,
) (*CrossModelRelationsAPI, error)

NewCrossModelRelationsAPI returns a new server-side CrossModelRelationsAPI facade.

func NewStateCrossModelRelationsAPI Uses

func NewStateCrossModelRelationsAPI(ctx facade.Context) (*CrossModelRelationsAPI, error)

NewStateCrossModelRelationsAPI creates a new server-side CrossModelRelations API facade backed by global state.

func (*CrossModelRelationsAPI) PublishIngressNetworkChanges Uses

func (api *CrossModelRelationsAPI) PublishIngressNetworkChanges(
    changes params.IngressNetworksChanges,
) (params.ErrorResults, error)

PublishIngressNetworkChanges publishes changes to the required ingress addresses to the model hosting the offer in the relation.

func (*CrossModelRelationsAPI) PublishRelationChanges Uses

func (api *CrossModelRelationsAPI) PublishRelationChanges(
    changes params.RemoteRelationsChanges,
) (params.ErrorResults, error)

PublishRelationChanges publishes relation changes to the model hosting the remote application involved in the relation.

func (*CrossModelRelationsAPI) RegisterRemoteRelations Uses

func (api *CrossModelRelationsAPI) RegisterRemoteRelations(
    relations params.RegisterRemoteRelationArgs,
) (params.RegisterRemoteRelationResults, error)

RegisterRemoteRelationArgs sets up the model to participate in the specified relations. This operation is idempotent.

func (*CrossModelRelationsAPI) RelationUnitSettings Uses

func (api *CrossModelRelationsAPI) RelationUnitSettings(relationUnits params.RemoteRelationUnits) (params.SettingsResults, error)

RelationUnitSettings returns the relation unit settings for the given relation units.

func (*CrossModelRelationsAPI) WatchEgressAddressesForRelations Uses

func (api *CrossModelRelationsAPI) WatchEgressAddressesForRelations(remoteRelationArgs params.RemoteEntityArgs) (params.StringsWatchResults, error)

WatchEgressAddressesForRelations creates a watcher that notifies when addresses, from which connections will originate for the relation, change. Each event contains the entire set of addresses which are required for ingress for the relation.

func (*CrossModelRelationsAPI) WatchOfferStatus Uses

func (api *CrossModelRelationsAPI) WatchOfferStatus(
    offerArgs params.OfferArgs,
) (params.OfferStatusWatchResults, error)

WatchOfferStatus starts an OfferStatusWatcher for watching the status of an offer.

func (*CrossModelRelationsAPI) WatchRelationUnits Uses

func (api *CrossModelRelationsAPI) WatchRelationUnits(remoteRelationArgs params.RemoteEntityArgs) (params.RelationUnitsWatchResults, error)

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

func (*CrossModelRelationsAPI) WatchRelationsSuspendedStatus Uses

func (api *CrossModelRelationsAPI) WatchRelationsSuspendedStatus(
    remoteRelationArgs params.RemoteEntityArgs,
) (params.RelationStatusWatchResults, error)

WatchRelationsSuspendedStatus starts a RelationStatusWatcher for watching the life and suspended status of a relation.

type CrossModelRelationsState Uses

type CrossModelRelationsState interface {

    // Model returns the model entity.
    Model() (Model, error)

    // AddOfferConnection creates a new offer connection record, which records details about a
    // relation made from a remote model to an offer in the local model.
    AddOfferConnection(state.AddOfferConnectionParams) (OfferConnection, error)

    // OfferConnectionForRelation returns the offer connection details for the given relation key.
    OfferConnectionForRelation(string) (OfferConnection, error)

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

type Model Uses

type Model interface {
    Name() string
    Owner() names.UserTag

type OfferConnection Uses

type OfferConnection interface {
    OfferUUID() string

type OfferWatcher Uses

type OfferWatcher interface {
    OfferUUID() string

OfferWatcher instances track changes to a specified offer.

Package crossmodelrelations imports 15 packages (graph) and is imported by 3 packages. Updated 2019-09-17. Refresh now. Tools for package owners.