etcd

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(m model2.Model, opts ...clientv3.OpOption) (bool, error)

func DefaultETCD

func DefaultETCD()

func Delete

func Delete(m model2.Model) (bool, error)

func Get

func Get(m model2.Model) (bool, error)

func Prefix

func Prefix() string

func Read

func Read(key string) (resp string, err error)

func Update

func Update(m model2.Model) (bool, error)

func Write

func Write(key string, val string) (err error)

Types

type ETCD

type ETCD struct {
	Client *clientv3.Client
	options2.Options
}
var E *ETCD

func NewETCD

func NewETCD(opt ...options2.Option) (etcd *ETCD, err error)

func (*ETCD) Create

func (e *ETCD) Create(m model2.Model, opts ...clientv3.OpOption) (ok bool, err error)

func (*ETCD) Delete

func (e *ETCD) Delete(m model2.Model) (ok bool, err error)

func (*ETCD) Get

func (e *ETCD) Get(m model2.Model) (ok bool, err error)

func (*ETCD) GetH

func (e *ETCD) GetH(m model2.ModelH) (ok bool, err error)

func (*ETCD) List

func (e *ETCD) List(key string) (list []model2.Model, err error)

todo change list

func (*ETCD) Read

func (e *ETCD) Read(key string) (resp string, err error)

func (*ETCD) Update

func (e *ETCD) Update(m model2.Model) (ok bool, err error)

func (*ETCD) Write

func (e *ETCD) Write(key string, val string) (err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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