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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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