Documentation
¶
Index ¶
- Variables
- type Client
- func (c *Client) ConsumeRemoteRelationChange(ctx context.Context, change params.RemoteRelationChangeEvent) error
- func (c *Client) ConsumeRemoteSecretChanges(ctx context.Context, changes []watcher.SecretRevisionChange) error
- func (c *Client) ControllerAPIInfoForModel(ctx context.Context, modelUUID string) (*api.Info, error)
- func (c *Client) ExportEntities(ctx context.Context, tags []names.Tag) ([]params.TokenResult, error)
- func (c *Client) GetToken(ctx context.Context, tag names.Tag) (string, error)
- func (c *Client) ImportRemoteEntity(ctx context.Context, entity names.Tag, token string) error
- func (c *Client) Relations(ctx context.Context, keys []string) ([]params.RemoteRelationResult, error)
- func (c *Client) RemoteApplications(ctx context.Context, applications []string) ([]params.RemoteApplicationResult, error)
- func (c *Client) SaveMacaroon(ctx context.Context, entity names.Tag, mac *macaroon.Macaroon) error
- func (c *Client) SetRemoteApplicationStatus(ctx context.Context, applicationName string, status status.Status, ...) error
- func (c *Client) UpdateControllerForModel(ctx context.Context, controller crossmodel.ControllerInfo, modelUUID string) error
- func (c *Client) WatchLocalRelationChanges(ctx context.Context, relationKey string) (apiwatcher.RemoteRelationWatcher, error)
- func (c *Client) WatchRemoteApplicationRelations(ctx context.Context, application string) (watcher.StringsWatcher, error)
- func (c *Client) WatchRemoteApplications(ctx context.Context) (watcher.StringsWatcher, error)
- func (c *Client) WatchRemoteRelations(ctx context.Context) (watcher.StringsWatcher, error)
- 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 {
// contains filtered or unexported fields
}
Client provides access to the remoterelations api facade.
func (*Client) ConsumeRemoteRelationChange ¶
func (c *Client) ConsumeRemoteRelationChange(ctx context.Context, change params.RemoteRelationChangeEvent) error
ConsumeRemoteRelationChange consumes a change to settings originating from the remote/offering side of a relation.
func (*Client) ConsumeRemoteSecretChanges ¶
func (c *Client) ConsumeRemoteSecretChanges(ctx context.Context, changes []watcher.SecretRevisionChange) error
ConsumeRemoteSecretChanges updates the local model with secret revision changes originating from the remote/offering model.
func (*Client) ControllerAPIInfoForModel ¶
func (c *Client) ControllerAPIInfoForModel(ctx context.Context, modelUUID string) (*api.Info, error)
ControllerAPIInfoForModel retrieves the controller API info for the specified model.
func (*Client) ExportEntities ¶
func (c *Client) ExportEntities(ctx context.Context, tags []names.Tag) ([]params.TokenResult, error)
ExportEntities allocates unique, remote entity IDs for the given entities in the local model.
func (*Client) GetToken ¶
GetToken returns the token associated with the entity with the given tag for the specified model.
func (*Client) ImportRemoteEntity ¶
ImportRemoteEntity adds an entity to the remote entities collection with the specified opaque token.
func (*Client) Relations ¶
func (c *Client) Relations(ctx context.Context, keys []string) ([]params.RemoteRelationResult, error)
Relations returns information about the cross-model relations with the specified keys in the local model.
func (*Client) RemoteApplications ¶
func (c *Client) RemoteApplications(ctx context.Context, applications []string) ([]params.RemoteApplicationResult, error)
RemoteApplications returns the current state of the remote applications with the specified names in the local model.
func (*Client) SaveMacaroon ¶
SaveMacaroon saves the macaroon for the entity.
func (*Client) SetRemoteApplicationStatus ¶
func (c *Client) SetRemoteApplicationStatus(ctx context.Context, applicationName string, status status.Status, message string) error
SetRemoteApplicationStatus sets the status for the specified remote application.
func (*Client) UpdateControllerForModel ¶
func (c *Client) UpdateControllerForModel(ctx context.Context, controller crossmodel.ControllerInfo, modelUUID string) error
UpdateControllerForModel ensures that there is an external controller record for the input info, associated with the input model ID.
func (*Client) WatchLocalRelationChanges ¶
func (c *Client) WatchLocalRelationChanges(ctx context.Context, relationKey string) (apiwatcher.RemoteRelationWatcher, error)
WatchLocalRelationChanges returns a watcher that emits fully-expanded changes (suitable for shipping over to a different controller) to the local units in the relation with the given key.
func (*Client) WatchRemoteApplicationRelations ¶
func (c *Client) WatchRemoteApplicationRelations(ctx context.Context, application string) (watcher.StringsWatcher, error)
WatchRemoteApplicationRelations returns remote relations watchers that delivers changes according to the addition, removal, and lifecycle changes of relations that the specified remote application is involved in; and also according to the entering, departing, and change of unit settings in those relations.
func (*Client) WatchRemoteApplications ¶
WatchRemoteApplications returns a strings watcher that notifies of the addition, removal, and lifecycle changes of remote applications in the model.
func (*Client) WatchRemoteRelations ¶
WatchRemoteRelations returns a strings watcher that notifies of the addition, removal, and lifecycle changes of remote relations in the model.