Documentation ¶
Index ¶
- func Register(registry facade.FacadeRegistry)
- type CrossModelRelationsAPIv3
- func (api *CrossModelRelationsAPIv3) PublishIngressNetworkChanges(ctx context.Context, changes params.IngressNetworksChanges) (params.ErrorResults, error)
- func (api *CrossModelRelationsAPIv3) PublishRelationChanges(ctx context.Context, changes params.RemoteRelationsChanges) (params.ErrorResults, error)
- func (api *CrossModelRelationsAPIv3) RegisterRemoteRelations(ctx context.Context, relations params.RegisterRemoteRelationArgs) (params.RegisterRemoteRelationResults, error)
- func (api *CrossModelRelationsAPIv3) WatchConsumedSecretsChanges(ctx context.Context, args params.WatchRemoteSecretChangesArgs) (params.SecretRevisionWatchResults, error)
- func (api *CrossModelRelationsAPIv3) WatchEgressAddressesForRelations(ctx context.Context, remoteRelationArgs params.RemoteEntityArgs) (params.StringsWatchResults, error)
- func (api *CrossModelRelationsAPIv3) WatchOfferStatus(ctx context.Context, offerArgs params.OfferArgs) (params.OfferStatusWatchResults, error)
- func (api *CrossModelRelationsAPIv3) WatchRelationChanges(ctx context.Context, remoteRelationArgs params.RemoteEntityArgs) (params.RemoteRelationWatchResults, error)
- func (api *CrossModelRelationsAPIv3) WatchRelationsSuspendedStatus(ctx context.Context, remoteRelationArgs params.RemoteEntityArgs) (params.RelationStatusWatchResults, error)
- type CrossModelRelationsState
- type Model
- type ModelConfigService
- type OfferWatcher
- type SecretService
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 CrossModelRelationsAPIv3 ¶
type CrossModelRelationsAPIv3 struct {
// contains filtered or unexported fields
}
CrossModelRelationsAPIv3 provides access to the CrossModelRelations API facade.
func NewCrossModelRelationsAPI ¶
func NewCrossModelRelationsAPI( modelID model.UUID, st CrossModelRelationsState, fw firewall.State, resources facade.Resources, authorizer facade.Authorizer, authCtxt *commoncrossmodel.AuthContext, secretService SecretService, modelConfigService ModelConfigService, egressAddressWatcher egressAddressWatcherFunc, relationStatusWatcher relationStatusWatcherFunc, offerStatusWatcher offerStatusWatcherFunc, consumedSecretsWatcher consumedSecretsWatcherFunc, logger corelogger.Logger, ) (*CrossModelRelationsAPIv3, error)
NewCrossModelRelationsAPI returns a new server-side CrossModelRelationsAPI facade.
func (*CrossModelRelationsAPIv3) PublishIngressNetworkChanges ¶
func (api *CrossModelRelationsAPIv3) PublishIngressNetworkChanges( ctx context.Context, 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( ctx context.Context, 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( ctx context.Context, 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(ctx context.Context, 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(ctx context.Context, 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( ctx context.Context, offerArgs params.OfferArgs, ) (params.OfferStatusWatchResults, error)
WatchOfferStatus starts an OfferStatusWatcher for watching the status of an offer.
func (*CrossModelRelationsAPIv3) WatchRelationChanges ¶
func (api *CrossModelRelationsAPIv3) WatchRelationChanges(ctx context.Context, 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( ctx context.Context, 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) }
CrossModelRelationsState provides the subset of global state required by the remote relations facade.
type ModelConfigService ¶
type ModelConfigService interface { ModelConfig(ctx context.Context) (*config.Config, error) Watch() (watcher.StringsWatcher, error) }
ModelConfigService is an interface that provides access to the model configuration.
type OfferWatcher ¶
type OfferWatcher interface { Err() error corewatcher.NotifyWatcher OfferUUID() string OfferName() string }
OfferWatcher instances track changes to a specified offer.