settingsevent

package
v0.172.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2024 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Type    EventType             `json:"type"`
	Setting settings.SettingField `json:"setting"`
	Value   interface{}           `json:"value"`
}

Event is a type for accounts events.

type EventType

type EventType string

EventType type for event types.

const (
	EventTypeChanged EventType = "changed"
)

type SettingChangeCb

type SettingChangeCb func(setting settings.SettingField, value interface{})

type Watcher

type Watcher struct {
	// contains filtered or unexported fields
}

Watcher executes a given callback whenever an account gets added/removed

func NewWatcher

func NewWatcher(feed *event.Feed, callback SettingChangeCb) *Watcher

func (*Watcher) Start

func (w *Watcher) Start()

func (*Watcher) Stop

func (w *Watcher) Stop()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL