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

package watcher

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


Package Files


func NewFilesystemAttachmentsWatcher Uses

func NewFilesystemAttachmentsWatcher(caller base.APICaller, result params.MachineStorageIdsWatchResult) watcher.MachineStorageIdsWatcher

NewFilesystemAttachmentsWatcher returns a MachineStorageIdsWatcher which communicates with the FilesystemAttachmentsWatcher API facade to watch filesystem attachments.

func NewMigrationStatusWatcher Uses

func NewMigrationStatusWatcher(caller base.APICaller, watcherId string) watcher.MigrationStatusWatcher

NewMigrationStatusWatcher takes the NotifyWatcherId returns by the MigrationSlave.Watch API and returns a watcher which will report status changes for any migration of the model associated with the API connection.

func NewNotifyWatcher Uses

func NewNotifyWatcher(caller base.APICaller, result params.NotifyWatchResult) watcher.NotifyWatcher

If an API call returns a NotifyWatchResult, you can use this to turn it into a local Watcher.

func NewOfferStatusWatcher Uses

func NewOfferStatusWatcher(
    caller base.APICaller, result params.OfferStatusWatchResult,
) watcher.OfferStatusWatcher

NewOfferStatusWatcher returns a watcher notifying of changes to offer status.

func NewRelationStatusWatcher Uses

func NewRelationStatusWatcher(
    caller base.APICaller, result params.RelationLifeSuspendedStatusWatchResult,
) watcher.RelationStatusWatcher

NewRelationStatusWatcher returns a watcher notifying of changes to relation life and suspended status.

func NewRelationUnitsWatcher Uses

func NewRelationUnitsWatcher(caller base.APICaller, result params.RelationUnitsWatchResult) watcher.RelationUnitsWatcher

func NewStringsWatcher Uses

func NewStringsWatcher(caller base.APICaller, result params.StringsWatchResult) watcher.StringsWatcher

func NewVolumeAttachmentPlansWatcher Uses

func NewVolumeAttachmentPlansWatcher(caller base.APICaller, result params.MachineStorageIdsWatchResult) watcher.MachineStorageIdsWatcher

NewVolumeAttachmentPlansWatcher returns a MachineStorageIdsWatcher which communicates with the VolumeAttachmentPlansWatcher API facade to watch volume attachments.

func NewVolumeAttachmentsWatcher Uses

func NewVolumeAttachmentsWatcher(caller base.APICaller, result params.MachineStorageIdsWatchResult) watcher.MachineStorageIdsWatcher

NewVolumeAttachmentsWatcher returns a MachineStorageIdsWatcher which communicates with the VolumeAttachmentsWatcher API facade to watch volume attachments.

type RemoteRelationWatcher Uses

type RemoteRelationWatcher interface {
    Changes() <-chan params.RemoteRelationChangeEvent

RemoteRelationWatcher is a worker that emits remote relation change events. It's not defined in core/watcher because it emits params structs - this makes more sense than converting to a core struct just to convert back when the event is published to the other model's API.

func NewRemoteRelationCompatWatcher Uses

func NewRemoteRelationCompatWatcher(
    caller base.APICaller,
    result params.RelationUnitsWatchResult,
    relationToken string,
    appToken string,
    getSettings SettingsGetter,
) RemoteRelationWatcher

NewRemoteRelationCompatWatcher returns a RemoteRelationWatcher based on a server-side RelationUnitsWatcher.

func NewRemoteRelationWatcher Uses

func NewRemoteRelationWatcher(caller base.APICaller, result params.RemoteRelationWatchResult) RemoteRelationWatcher

NewRemoteRelationWatcher returns a RemoteRelationWatcher receiving events from the one running on the API server.

type SettingsGetter Uses

type SettingsGetter func([]string) ([]params.SettingsResult, error)

SettingsGetter is a callback function the remote relation compatibility watcher calls to get unit settings when expanding events.

Package watcher imports 12 packages (graph) and is imported by 1217 packages. Updated 2020-07-22. Refresh now. Tools for package owners.