juju: github.com/juju/juju/api/crossmodelrelations Index | Files

package crossmodelrelations

import "github.com/juju/juju/api/crossmodelrelations"

Index

Package Files

crossmodelrelations.go macarooncache.go

type Client Uses

type Client struct {
    base.ClientFacade
    // contains filtered or unexported fields
}

Client provides access to the crossmodelrelations api facade.

func NewClient Uses

func NewClient(caller base.APICallCloser) *Client

NewClient creates a new client-side CrossModelRelations facade.

func NewClientWithCache Uses

func NewClientWithCache(caller base.APICallCloser, cache *MacaroonCache) *Client

NewClientWithCache creates a new client-side CrossModelRelations facade with the specified cache.

func (*Client) PublishIngressNetworkChange Uses

func (c *Client) PublishIngressNetworkChange(change params.IngressNetworksChangeEvent) error

func (*Client) PublishRelationChange Uses

func (c *Client) PublishRelationChange(change params.RemoteRelationChangeEvent) error

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

func (*Client) RegisterRemoteRelations Uses

func (c *Client) RegisterRemoteRelations(relations ...params.RegisterRemoteRelationArg) ([]params.RegisterRemoteRelationResult, error)

RegisterRemoteRelations sets up the remote model to participate in the specified relations.

func (*Client) RelationUnitSettings Uses

func (c *Client) RelationUnitSettings(relationUnits []params.RemoteRelationUnit) ([]params.SettingsResult, error)

RelationUnitSettings returns the relation unit settings for the given relation units in the remote model.

func (*Client) WatchEgressAddressesForRelation Uses

func (c *Client) WatchEgressAddressesForRelation(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 Uses

func (c *Client) WatchOfferStatus(arg params.OfferArg) (watcher.OfferStatusWatcher, error)

WatchOfferStatus starts an OfferStatusWatcher for watching the status of the specified offer in the remote model.

func (*Client) WatchRelationSuspendedStatus Uses

func (c *Client) WatchRelationSuspendedStatus(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.

func (*Client) WatchRelationUnits Uses

func (c *Client) WatchRelationUnits(remoteRelationArg params.RemoteEntityArg) (watcher.RelationUnitsWatcher, error)

WatchRelationUnits returns a watcher that notifies of changes to the units in the remote model for the relation with the given remote token.

type MacaroonCache Uses

type MacaroonCache struct {
    // contains filtered or unexported fields
}

MacaroonCache contains macaroons which are removed at a specified interval.

func NewMacaroonCache Uses

func NewMacaroonCache(clock clock.Clock) *MacaroonCache

NewMacaroonCache returns a cache containing macaroons which are removed after the macaroons' expiry time.

func (MacaroonCache) Get Uses

func (c MacaroonCache) Get(k string) (macaroon.Slice, bool)

Get returns a macaroon slice from the cache, and a bool indicating if the slice for the key was found.

func (MacaroonCache) Upsert Uses

func (c MacaroonCache) Upsert(token string, ms macaroon.Slice)

Upsert inserts or updates a macaroon slice in the cache.

Package crossmodelrelations imports 12 packages (graph) and is imported by 6 packages. Updated 2019-05-23. Refresh now. Tools for package owners.