Documentation
¶
Index ¶
- Constants
- Variables
- func NewFilesystemAttachmentsWatcher(caller base.APICaller, result params.MachineStorageIdsWatchResult) watcher.MachineStorageIDsWatcher
- func NewMigrationStatusWatcher(caller base.APICaller, watcherId string) watcher.MigrationStatusWatcher
- func NewNotifyWatcher(caller base.APICaller, result params.NotifyWatchResult) watcher.NotifyWatcher
- func NewOfferStatusWatcher(caller base.APICaller, result params.OfferStatusWatchResult) watcher.OfferStatusWatcher
- func NewRelationStatusWatcher(caller base.APICaller, result params.RelationLifeSuspendedStatusWatchResult) watcher.RelationStatusWatcher
- func NewRelationUnitsWatcher(caller base.APICaller, result params.RelationUnitsWatchResult) watcher.RelationUnitsWatcher
- func NewSecretBackendRotateWatcher(caller base.APICaller, result params.SecretBackendRotateWatchResult) watcher.SecretBackendRotateWatcher
- func NewSecretsRevisionWatcher(caller base.APICaller, result params.SecretRevisionWatchResult) watcher.SecretsRevisionWatcher
- func NewSecretsTriggerWatcher(caller base.APICaller, result params.SecretTriggerWatchResult) watcher.SecretTriggerWatcher
- func NewStringsWatcher(caller base.APICaller, result params.StringsWatchResult) watcher.StringsWatcher
- func NewVolumeAttachmentPlansWatcher(caller base.APICaller, result params.MachineStorageIdsWatchResult) watcher.MachineStorageIDsWatcher
- func NewVolumeAttachmentsWatcher(caller base.APICaller, result params.MachineStorageIdsWatchResult) watcher.MachineStorageIDsWatcher
- type RemoteRelationWatcher
- type SecretsRevisionWatcher
- type SettingsGetter
Constants ¶
const ( // WatcherStopTimeout is the time to wait for a watcher to stop. WatcherStopTimeout = time.Second * 60 )
Variables ¶
var ( // ErrRestartArgent matches juju/juju/internal/worker/error.go ErrRestartAgent // and is used to indicate that the watcher should be restarted. ErrRestartAgent = errors.New("agent should be restarted") )
Functions ¶
func NewFilesystemAttachmentsWatcher ¶
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 ¶
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 ¶
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 ¶
func NewOfferStatusWatcher( caller base.APICaller, result params.OfferStatusWatchResult, ) watcher.OfferStatusWatcher
NewOfferStatusWatcher returns a watcher notifying of changes to offer status.
func NewRelationStatusWatcher ¶
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 ¶
func NewRelationUnitsWatcher(caller base.APICaller, result params.RelationUnitsWatchResult) watcher.RelationUnitsWatcher
func NewSecretBackendRotateWatcher ¶
func NewSecretBackendRotateWatcher( caller base.APICaller, result params.SecretBackendRotateWatchResult, ) watcher.SecretBackendRotateWatcher
NewSecretBackendRotateWatcher returns a new secret backend rotate watcher.
func NewSecretsRevisionWatcher ¶
func NewSecretsRevisionWatcher( caller base.APICaller, result params.SecretRevisionWatchResult, ) watcher.SecretsRevisionWatcher
NewSecretsRevisionWatcher returns a watcher notifying of changes to secret revisions.
func NewSecretsTriggerWatcher ¶
func NewSecretsTriggerWatcher( caller base.APICaller, result params.SecretTriggerWatchResult, ) watcher.SecretTriggerWatcher
NewSecretsTriggerWatcher returns a new secrets trigger watcher.
func NewStringsWatcher ¶
func NewStringsWatcher(caller base.APICaller, result params.StringsWatchResult) watcher.StringsWatcher
func NewVolumeAttachmentPlansWatcher ¶
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 ¶
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.
Types ¶
type RemoteRelationWatcher ¶
type RemoteRelationWatcher = watcher.Watcher[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 ¶
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 ¶
func NewRemoteRelationWatcher(caller base.APICaller, result params.RemoteRelationWatchResult) RemoteRelationWatcher
NewRemoteRelationWatcher returns a RemoteRelationWatcher receiving events from the one running on the API server.
type SecretsRevisionWatcher ¶
type SecretsRevisionWatcher struct {
// contains filtered or unexported fields
}
SecretsRevisionWatcher will send notifications of changes to secret revisions.
func (*SecretsRevisionWatcher) Changes ¶
func (w *SecretsRevisionWatcher) Changes() watcher.SecretRevisionChannel
Changes returns a channel that will receive the changes to a secret revision. The first event reflects the current values of these attributes.
type SettingsGetter ¶
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.