Documentation ¶
Index ¶
- type SettingsWatcher
- type UserWatcher
- func (watcher *UserWatcher) CalculateHash(id string) (uint64, error)
- func (watcher *UserWatcher) OnAdd(obj interface{})
- func (watcher *UserWatcher) OnDelete(obj interface{})
- func (watcher *UserWatcher) OnUpdate(oldObj, newObj interface{})
- func (watcher *UserWatcher) Subscribe(subscription pubsub.Subscription, opts ...pubsub.SubscribeOption) pubsub.Unsubscriber
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SettingsWatcher ¶
type SettingsWatcher struct {
// contains filtered or unexported fields
}
SettingsWatcher watches settings and notifies its subscribers about any changes.
func NewSettingsWatcher ¶
func NewSettingsWatcher(ctx context.Context, log *zap.SugaredLogger) (*SettingsWatcher, error)
SettingsWatcher returns a new resource watcher.
func (*SettingsWatcher) OnAdd ¶ added in v2.20.0
func (watcher *SettingsWatcher) OnAdd(obj interface{})
func (*SettingsWatcher) OnDelete ¶ added in v2.20.0
func (watcher *SettingsWatcher) OnDelete(obj interface{})
func (*SettingsWatcher) OnUpdate ¶ added in v2.20.0
func (watcher *SettingsWatcher) OnUpdate(oldObj, newObj interface{})
func (*SettingsWatcher) Subscribe ¶
func (watcher *SettingsWatcher) Subscribe(subscription pubsub.Subscription) pubsub.Unsubscriber
Subscribe allows to register subscription handler which will be invoked on each settings change.
type UserWatcher ¶
type UserWatcher struct {
// contains filtered or unexported fields
}
UserWatcher watches user and notifies its subscribers about any changes.
func NewUserWatcher ¶
func NewUserWatcher(ctx context.Context, log *zap.SugaredLogger) (*UserWatcher, error)
UserWatcher returns a new resource watcher.
func (*UserWatcher) CalculateHash ¶
func (watcher *UserWatcher) CalculateHash(id string) (uint64, error)
func (*UserWatcher) OnAdd ¶ added in v2.20.0
func (watcher *UserWatcher) OnAdd(obj interface{})
func (*UserWatcher) OnDelete ¶ added in v2.20.0
func (watcher *UserWatcher) OnDelete(obj interface{})
func (*UserWatcher) OnUpdate ¶ added in v2.20.0
func (watcher *UserWatcher) OnUpdate(oldObj, newObj interface{})
func (*UserWatcher) Subscribe ¶
func (watcher *UserWatcher) Subscribe(subscription pubsub.Subscription, opts ...pubsub.SubscribeOption) pubsub.Unsubscriber
Subscribe allows registering subscription handler which will be invoked on each user change.
Click to show internal directories.
Click to hide internal directories.