etcd_utils

package
v0.0.0-...-e603270 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2023 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EtcdAllocUniqID

func EtcdAllocUniqID(c *clientv3.Client, idKey string, count uint64) (uint64, uint64, error)

func EtcdGetKV

func EtcdGetKV(c *clientv3.Client, key string, opts ...clientv3.OpOption) ([]byte, int64, error)

func EtcdRange

func EtcdRange(c *clientv3.Client, prefix string) ([]*mvccpb.KeyValue, int64, error)

EtcdRange return (KeyValue, Revision, error)

func EtcdSetKV

func EtcdSetKV(c *clientv3.Client, key string, val []byte, opts ...clientv3.OpOption) error

func EtcdSetKVS

func EtcdSetKVS(c *clientv3.Client, cmps []clientv3.Cmp, ops []clientv3.Op) error

func EtcdWatchEvents

func EtcdWatchEvents(c *clientv3.Client, start, end string, startRev int64) (clientv3.WatchChan, func())

func ServeETCD

func ServeETCD(cfg *embed.Config) (*embed.Etcd, *clientv3.Client, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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