Documentation
¶
Index ¶
- Variables
- type Client
- func (c *Client) PublishIngressNetworkChange(ctx context.Context, change params.IngressNetworksChangeEvent) error
- func (c *Client) PublishRelationChange(ctx context.Context, change params.RemoteRelationChangeEvent) error
- func (c *Client) RegisterRemoteRelations(ctx context.Context, relations ...params.RegisterRemoteRelationArg) ([]params.RegisterRemoteRelationResult, error)
- func (c *Client) WatchConsumedSecretsChanges(ctx context.Context, applicationToken, relationToken string, ...) (watcher.SecretsRevisionWatcher, error)
- func (c *Client) WatchEgressAddressesForRelation(ctx context.Context, remoteRelationArg params.RemoteEntityArg) (watcher.StringsWatcher, error)
- func (c *Client) WatchOfferStatus(ctx context.Context, arg params.OfferArg) (watcher.OfferStatusWatcher, error)
- func (c *Client) WatchRelationChanges(ctx context.Context, relationToken, applicationToken string, ...) (apiwatcher.RemoteRelationWatcher, error)
- func (c *Client) WatchRelationSuspendedStatus(ctx context.Context, arg params.RemoteEntityArg) (watcher.RelationStatusWatcher, error)
- type MacaroonCache
- type Option
Constants ¶
This section is empty.
Variables ¶
var WithTracer = base.WithTracer
WithTracer returns an Option that configures the Client to use the supplied tracer.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { base.ClientFacade // contains filtered or unexported fields }
Client provides access to the crossmodelrelations api facade.
func NewClient ¶
func NewClient(caller base.APICallCloser, options ...Option) *Client
NewClient creates a new client-side CrossModelRelations facade.
func NewClientWithCache ¶
func NewClientWithCache(caller base.APICallCloser, cache *MacaroonCache, options ...Option) *Client
NewClientWithCache creates a new client-side CrossModelRelations facade with the specified cache.
func (*Client) PublishIngressNetworkChange ¶
func (*Client) PublishRelationChange ¶
func (c *Client) PublishRelationChange(ctx context.Context, change params.RemoteRelationChangeEvent) error
PublishRelationChange publishes relation changes to the model hosting the remote application involved in the relation.
func (*Client) RegisterRemoteRelations ¶
func (c *Client) RegisterRemoteRelations(ctx context.Context, relations ...params.RegisterRemoteRelationArg) ([]params.RegisterRemoteRelationResult, error)
RegisterRemoteRelations sets up the remote model to participate in the specified relations.
func (*Client) WatchConsumedSecretsChanges ¶
func (c *Client) WatchConsumedSecretsChanges(ctx context.Context, applicationToken, relationToken string, mac *macaroon.Macaroon) (watcher.SecretsRevisionWatcher, error)
WatchConsumedSecretsChanges returns a watcher which notifies of new secret revisions consumed by the app with the specified token.
func (*Client) WatchEgressAddressesForRelation ¶
func (c *Client) WatchEgressAddressesForRelation(ctx context.Context, remoteRelationArg params.RemoteEntityArg) (watcher.StringsWatcher, error)
WatchEgressAddressesForRelation returns a watcher that notifies when addresses, from which connections will originate to the offering side of the relation, change. Each event contains the entire set of addresses which the offering side is required to allow for access to the other side of the relation.
func (*Client) WatchOfferStatus ¶
func (c *Client) WatchOfferStatus(ctx context.Context, arg params.OfferArg) (watcher.OfferStatusWatcher, error)
WatchOfferStatus starts an OfferStatusWatcher for watching the status of the specified offer in the remote model.
func (*Client) WatchRelationChanges ¶
func (c *Client) WatchRelationChanges(ctx context.Context, relationToken, applicationToken string, macs macaroon.Slice) (apiwatcher.RemoteRelationWatcher, error)
WatchRelationChanges returns a watcher that notifies of changes to the units or application settings in the remote model for the relation with the given remote token.
func (*Client) WatchRelationSuspendedStatus ¶
func (c *Client) WatchRelationSuspendedStatus(ctx context.Context, arg params.RemoteEntityArg) (watcher.RelationStatusWatcher, error)
WatchRelationSuspendedStatus starts a RelationStatusWatcher for watching the life and suspended status of the specified relation in the remote model.
type MacaroonCache ¶
type MacaroonCache struct {
// contains filtered or unexported fields
}
MacaroonCache contains macaroons which are removed at a specified interval.
func NewMacaroonCache ¶
func NewMacaroonCache(clock clock.Clock) *MacaroonCache
NewMacaroonCache returns a cache containing macaroons which are removed after the macaroons' expiry time.