Documentation
¶
Index ¶
- type CrossModelRelationsAPI
- func (api *CrossModelRelationsAPI) PublishIngressNetworkChanges(changes params.IngressNetworksChanges) (params.ErrorResults, error)
- func (api *CrossModelRelationsAPI) PublishRelationChanges(changes params.RemoteRelationsChanges) (params.ErrorResults, error)
- func (api *CrossModelRelationsAPI) RegisterRemoteRelations(relations params.RegisterRemoteRelationArgs) (params.RegisterRemoteRelationResults, error)
- func (api *CrossModelRelationsAPI) RelationUnitSettings(relationUnits params.RemoteRelationUnits) (params.SettingsResults, error)
- func (api *CrossModelRelationsAPI) WatchEgressAddressesForRelations(remoteRelationArgs params.RemoteEntityArgs) (params.StringsWatchResults, error)
- func (api *CrossModelRelationsAPI) WatchOfferStatus(offerArgs params.OfferArgs) (params.OfferStatusWatchResults, error)
- func (api *CrossModelRelationsAPI) WatchRelationUnits(remoteRelationArgs params.RemoteEntityArgs) (params.RelationUnitsWatchResults, error)
- func (api *CrossModelRelationsAPI) WatchRelationsSuspendedStatus(remoteRelationArgs params.RemoteEntityArgs) (params.RelationStatusWatchResults, error)
- type CrossModelRelationsState
- type Model
- type OfferConnection
- type OfferWatcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CrossModelRelationsAPI ¶
type CrossModelRelationsAPI struct {
// contains filtered or unexported fields
}
CrossModelRelationsAPI provides access to the CrossModelRelations API facade.
func NewCrossModelRelationsAPI ¶
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 ¶
func NewStateCrossModelRelationsAPI(ctx facade.Context) (*CrossModelRelationsAPI, error)
NewStateCrossModelRelationsAPI creates a new server-side CrossModelRelations API facade backed by global state.
func (*CrossModelRelationsAPI) PublishIngressNetworkChanges ¶
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 ¶
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 ¶
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 ¶
func (api *CrossModelRelationsAPI) RelationUnitSettings(relationUnits params.RemoteRelationUnits) (params.SettingsResults, error)
RelationUnitSettings returns the relation unit settings for the given relation units.
func (*CrossModelRelationsAPI) WatchEgressAddressesForRelations ¶
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 ¶
func (api *CrossModelRelationsAPI) WatchOfferStatus( offerArgs params.OfferArgs, ) (params.OfferStatusWatchResults, error)
WatchOfferStatus starts an OfferStatusWatcher for watching the status of an offer.
func (*CrossModelRelationsAPI) WatchRelationUnits ¶
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 ¶
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 ¶
type CrossModelRelationsState interface { common.Backend // 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 OfferConnection ¶
type OfferConnection interface {
OfferUUID() string
}
type OfferWatcher ¶
type OfferWatcher interface { state.NotifyWatcher OfferUUID() string }
OfferWatcher instances track changes to a specified offer.