standard

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2021 License: MIT Imports: 1 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 {
	Event EventType
	Key   string
	Value string
}

事件

type EventType

type EventType int

事件类型

const (
	// 添加事件
	EventAdd EventType = iota
	// 修改事件
	EventUpdate
	// 删除事件
	EventRemove
)

type Watcher

type Watcher interface {
	// 监听
	Watch(path string) error
	// 事件触发
	Event(ctx context.Context, keys ...string) <-chan Event
	// 关闭
	Close() error
}

事件标准

Jump to

Keyboard shortcuts

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