kv

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2022 License: Zlib Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config interface {
	Set(data Data) error
	Get(key Key) ([]*Data, error)
}

type Data

type Data struct {
	Key
	Value string //json format
}

type Key

type Key struct {
	Path    string
	Service string
}

Key * 一个KEY 值是由路径+服务名称组合

func NewKey

func NewKey(key string) Key

func (Key) ToKey

func (n Key) ToKey() string

type WatchChan

type WatchChan <-chan WatchResult

type WatchResult

type WatchResult struct {
	Data []*Data
}

type Watcher

type Watcher interface {
	Watcher(key Key) (WatchChan, error)
}

Jump to

Keyboard shortcuts

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