watch

package
v0.0.0-...-722fe32 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventType

type EventType uint8
const (
	Put EventType = iota
	Del
)

type WatchEvent

type WatchEvent struct {
	Key       string
	Value     []byte
	EventType EventType
}

type Watcher

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

type WatcherManager

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

func NewWatcherManager

func NewWatcherManager() *WatcherManager

func (*WatcherManager) Close

func (wm *WatcherManager) Close()

func (*WatcherManager) Notify

func (wm *WatcherManager) Notify(watchEvent *WatchEvent)

func (*WatcherManager) Start

func (wm *WatcherManager) Start()

func (*WatcherManager) UnWatch

func (wm *WatcherManager) UnWatch(watcher *Watcher)

func (*WatcherManager) Watch

func (wm *WatcherManager) Watch(ctx context.Context, key string) <-chan *WatchEvent

func (*WatcherManager) Watched

func (wm *WatcherManager) Watched(key string) bool

Jump to

Keyboard shortcuts

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