etcdv3

package
v0.0.0-...-e5a0710 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrCodeKeyNotFound int = iota + 1
)
View Source
const (
	Timeout time.Duration = 5 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Code               int
	Key                string
	ResourceVersion    int64
	AdditionalErrorMsg string
}

func NewKeyNotFoundError

func NewKeyNotFoundError(key string, rv int64) *Error

func (Error) Error

func (e Error) Error() string

type Etcdv3

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

func NewEtcdv3Client

func NewEtcdv3Client(endpoints string) (*Etcdv3, error)

func (*Etcdv3) GetDetail

func (e *Etcdv3) GetDetail(ctx context.Context, key string) (*clientv3.GetResponse, error)

func (*Etcdv3) Health

func (e *Etcdv3) Health(ctx context.Context) error

func (*Etcdv3) List

func (e *Etcdv3) List(ctx context.Context, key string) ([]string, error)

func (*Etcdv3) Update

func (e *Etcdv3) Update(ctx context.Context, key, value string) (*clientv3.PutResponse, error)

Jump to

Keyboard shortcuts

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