etcd

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultEndpoints = []string{"http://127.0.0.1:2379"}
	ReconnectTime    = 2 * time.Second
)

Functions

func DefaultStore added in v0.2.4

func DefaultStore(cfg *config.Config) (client.KeysAPI, error)

func FlattenToKVBytes

func FlattenToKVBytes(n *client.Node, nodes stores.KVBytes) stores.KVBytes

func New

func New(cfg *config.Config) stores.IFace

Types

type Store added in v0.2.4

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

func (*Store) Close added in v0.2.4

func (s *Store) Close()

func (*Store) Delete added in v0.2.4

func (s *Store) Delete(key string) error

func (*Store) Get added in v0.2.4

func (s *Store) Get(key string) (*stores.KVByte, error)

func (*Store) Init added in v0.2.4

func (s *Store) Init()

Init etcd watches do not fire an initial event. This method triggers a write to the file systems of the entire keyspace.

func (*Store) List added in v0.2.4

func (s *Store) List(prefix string) (stores.KVBytes, error)

func (*Store) Register added in v0.2.4

func (s *Store) Register(cb func(kvb stores.KVBytes))

func (*Store) Set added in v0.2.4

func (s *Store) Set(key string, bts []byte) error

func (*Store) Updated added in v0.2.4

func (s *Store) Updated(kvs interface{})

func (*Store) Watch added in v0.2.4

func (s *Store) Watch() error

Jump to

Keyboard shortcuts

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