etcd

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Client *etcdv3.Client
View Source
var ErrEtcdTransactionFailed = errors.New("etcd transaction failed")

Functions

func LoadKey

func LoadKey(key string, modelStruct interface{}) (bool, error)

func PutKey

func PutKey(key string, data interface{}) error

Types

type Transaction

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

func NewTransaction

func NewTransaction() *Transaction

func (*Transaction) AppendStringArray

func (tran *Transaction) AppendStringArray(key string, values ...string)

func (*Transaction) CreateJSON

func (tran *Transaction) CreateJSON(key string, data interface{})

func (*Transaction) Execute

func (tran *Transaction) Execute(resolvers ...func(map[string]interface{}) error) (*etcdv3.TxnResponse, error)

func (*Transaction) ExecuteMustSuccess

func (tran *Transaction) ExecuteMustSuccess() error

func (*Transaction) PullStringArray

func (tran *Transaction) PullStringArray(key string, value string)

func (*Transaction) PutJSON

func (tran *Transaction) PutJSON(key string, data interface{})

func (*Transaction) WatchJSON

func (tran *Transaction) WatchJSON(key string, schema interface{}, resolver func(interface{}) error)

Jump to

Keyboard shortcuts

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