libprotoconf

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: May 19, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KVStore

type KVStore int
const (
	Consul KVStore = iota
	Zookeeper
	Etcd
)

type Result

type Result struct {
	Value *any.Any
	Error error
}

Result of the Watch operation or error

type Watcher

type Watcher interface {
	Watch(path string, stopCh <-chan struct{}) (<-chan Result, error)
	Close()
}

Watcher enables getting updates on protoconf paths

func NewFileWatcher

func NewFileWatcher(protoconfRoot string) (Watcher, error)

NewFileWatcher creates a new file-backed protoconf watcher

func NewKVWatcher

func NewKVWatcher(kvType KVStore, address string, prefix string) (Watcher, error)

NewWatcher creates a new kv-backed Protoconf watcher

Jump to

Keyboard shortcuts

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