Documentation ¶
Index ¶
- type Client
- func (c *Client) ExportEntities(tags []names.Tag) ([]params.RemoteEntityIdResult, error)
- func (c *Client) GetToken(sourceModelUUID string, tag names.Tag) (string, error)
- func (c *Client) ImportRemoteEntity(sourceModelUUID string, entity names.Tag, token string) error
- func (c *Client) PublishLocalRelationChange(change params.RemoteRelationChangeEvent) error
- func (c *Client) RegisterRemoteRelations(relations ...params.RegisterRemoteRelation) ([]params.RemoteEntityIdResult, error)
- func (c *Client) RelationUnitSettings(relationUnits []params.RelationUnit) ([]params.SettingsResult, error)
- func (c *Client) Relations(keys []string) ([]params.RemoteRelationResult, error)
- func (c *Client) RemoteApplications(applications []string) ([]params.RemoteApplicationResult, error)
- func (c *Client) RemoveRemoteEntity(sourceModelUUID string, entity names.Tag) error
- func (c *Client) WatchLocalRelationUnits(relationKey string) (watcher.RelationUnitsWatcher, error)
- func (c *Client) WatchRemoteApplicationRelations(application string) (watcher.StringsWatcher, error)
- func (c *Client) WatchRemoteApplications() (watcher.StringsWatcher, error)
- func (c *Client) WatchRemoteRelations() (watcher.StringsWatcher, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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) ExportEntities ¶
func (c *Client) ExportEntities(tags []names.Tag) ([]params.RemoteEntityIdResult, 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) PublishLocalRelationChange ¶
func (c *Client) PublishLocalRelationChange(change params.RemoteRelationChangeEvent) error
PublishLocalRelationChange publishes local relations changes to the remote side offering those relations.
func (*Client) RegisterRemoteRelations ¶
func (c *Client) RegisterRemoteRelations(relations ...params.RegisterRemoteRelation) ([]params.RemoteEntityIdResult, error)
RegisterRemoteRelations sets up the local model to participate in the specified relations.
func (*Client) RelationUnitSettings ¶
func (c *Client) RelationUnitSettings(relationUnits []params.RelationUnit) ([]params.SettingsResult, error)
RelationUnitSettings returns the relation unit settings for the given relation units in the local model.
func (*Client) Relations ¶
func (c *Client) Relations(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(applications []string) ([]params.RemoteApplicationResult, error)
RemoteApplications returns the current state of the remote applications with the specified names in the local model.
func (*Client) RemoveRemoteEntity ¶
RemoveRemoteEntity removes the specified entity from the remote entities collection.
func (*Client) WatchLocalRelationUnits ¶
func (c *Client) WatchLocalRelationUnits(relationKey string) (watcher.RelationUnitsWatcher, error)
WatchLocalRelationUnits returns a watcher that notifies of changes to the local units in the relation with the given key.
func (*Client) WatchRemoteApplicationRelations ¶
func (c *Client) WatchRemoteApplicationRelations(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 ¶
func (c *Client) WatchRemoteApplications() (watcher.StringsWatcher, error)
WatchRemoteApplications returns a strings watcher that notifies of the addition, removal, and lifecycle changes of remote applications in the model.
func (*Client) WatchRemoteRelations ¶
func (c *Client) WatchRemoteRelations() (watcher.StringsWatcher, error)
WatchRemoteRelations returns a strings watcher that notifies of the addition, removal, and lifecycle changes of remote relations in the model.