Documentation
¶
Index ¶
- func Register(registry facade.FacadeRegistry)
- type CrossModelRelationsAPIv2
- type CrossModelRelationsAPIv3
- func (api *CrossModelRelationsAPIv3) PublishIngressNetworkChanges(changes params.IngressNetworksChanges) (params.ErrorResults, error)
- func (api *CrossModelRelationsAPIv3) PublishRelationChanges(changes params.RemoteRelationsChanges) (params.ErrorResults, error)
- func (api *CrossModelRelationsAPIv3) RegisterRemoteRelations(relations params.RegisterRemoteRelationArgs) (params.RegisterRemoteRelationResults, error)
- func (api *CrossModelRelationsAPIv3) WatchConsumedSecretsChanges(args params.WatchRemoteSecretChangesArgs) (params.SecretRevisionWatchResults, error)
- func (api *CrossModelRelationsAPIv3) WatchEgressAddressesForRelations(remoteRelationArgs params.RemoteEntityArgs) (params.StringsWatchResults, error)
- func (api *CrossModelRelationsAPIv3) WatchOfferStatus(offerArgs params.OfferArgs) (params.OfferStatusWatchResults, error)
- func (api *CrossModelRelationsAPIv3) WatchRelationChanges(remoteRelationArgs params.RemoteEntityArgs) (params.RemoteRelationWatchResults, error)
- func (api *CrossModelRelationsAPIv3) WatchRelationsSuspendedStatus(remoteRelationArgs params.RemoteEntityArgs) (params.RelationStatusWatchResults, error)
- type CrossModelRelationsState
- type Model
- type OfferWatcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(registry facade.FacadeRegistry)
Register is called to expose a package of facades onto a given registry.
Types ¶
type CrossModelRelationsAPIv2 ¶
type CrossModelRelationsAPIv2 struct {
*CrossModelRelationsAPIv3
}
CrossModelRelationsAPIv2 provides access to the CrossModelRelations API facade.
func (*CrossModelRelationsAPIv2) RegisterRemoteRelations ¶
func (api *CrossModelRelationsAPIv2) RegisterRemoteRelations( relations params.RegisterRemoteRelationArgsV2, ) (params.RegisterRemoteRelationResults, error)
RegisterRemoteRelations sets up the model to participate in the specified relations. This operation is idempotent.
type CrossModelRelationsAPIv3 ¶
type CrossModelRelationsAPIv3 struct {
// contains filtered or unexported fields
}
CrossModelRelationsAPIv3 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, consumedSecretsWatcher consumedSecretsWatcherFunc, ) (*CrossModelRelationsAPIv3, error)
NewCrossModelRelationsAPI returns a new server-side CrossModelRelationsAPI facade.
func (*CrossModelRelationsAPIv3) PublishIngressNetworkChanges ¶
func (api *CrossModelRelationsAPIv3) 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 (*CrossModelRelationsAPIv3) PublishRelationChanges ¶
func (api *CrossModelRelationsAPIv3) PublishRelationChanges( changes params.RemoteRelationsChanges, ) (params.ErrorResults, error)
PublishRelationChanges publishes relation changes to the model hosting the remote application involved in the relation.
func (*CrossModelRelationsAPIv3) RegisterRemoteRelations ¶
func (api *CrossModelRelationsAPIv3) RegisterRemoteRelations( relations params.RegisterRemoteRelationArgs, ) (params.RegisterRemoteRelationResults, error)
RegisterRemoteRelations sets up the model to participate in the specified relations. This operation is idempotent.
func (*CrossModelRelationsAPIv3) WatchConsumedSecretsChanges ¶
func (api *CrossModelRelationsAPIv3) WatchConsumedSecretsChanges(args params.WatchRemoteSecretChangesArgs) (params.SecretRevisionWatchResults, error)
WatchConsumedSecretsChanges returns a watcher which notifies of changes to any secrets for the specified remote consumers.
func (*CrossModelRelationsAPIv3) WatchEgressAddressesForRelations ¶
func (api *CrossModelRelationsAPIv3) 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 (*CrossModelRelationsAPIv3) WatchOfferStatus ¶
func (api *CrossModelRelationsAPIv3) WatchOfferStatus( offerArgs params.OfferArgs, ) (params.OfferStatusWatchResults, error)
WatchOfferStatus starts an OfferStatusWatcher for watching the status of an offer.
func (*CrossModelRelationsAPIv3) WatchRelationChanges ¶
func (api *CrossModelRelationsAPIv3) WatchRelationChanges(remoteRelationArgs params.RemoteEntityArgs) ( params.RemoteRelationWatchResults, error, )
WatchRelationChanges starts a RemoteRelationChangesWatcher for each specified relation, returning the watcher IDs and initial values, or an error if the remote relations couldn't be watched.
func (*CrossModelRelationsAPIv3) WatchRelationsSuspendedStatus ¶
func (api *CrossModelRelationsAPIv3) 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) (common.OfferConnection, error) // IsMigrationActive returns true if the current model is // in the process of being migrated to another controller. IsMigrationActive() (bool, error) // GetSecretConsumerInfo returns the remote app tag and offer uuid // for the specified consumer app and relation tokens. GetSecretConsumerInfo(string, string) (names.Tag, string, error) // GetSecret gets the secret metadata for the given secret URI. GetSecret(*coresecrets.URI) (*coresecrets.SecretMetadata, error) // WatchConsumedSecretsChanges returns a watcher for secrets // consumed by the specified remote consumer. WatchConsumedSecretsChanges(string) (state.StringsWatcher, error) }
CrossModelRelationsState provides the subset of global state required by the remote relations facade.
type OfferWatcher ¶
type OfferWatcher interface { state.NotifyWatcher OfferUUID() string OfferName() string }
OfferWatcher instances track changes to a specified offer.