etcd

package
v0.0.0-...-55fbde6 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Etcd2

type Etcd2 struct {
	datastore.Datastore
	Client *etcdv2.Client
	Key    etcdv2.KeysAPI
}

Etcd2 is a struct for the Etcd v2 driver

func NewV2

func NewV2(host, port string) (*Etcd2, error)

NewV2 returns a pointer to an Etcd2 driver or an error

func (Etcd2) Find

func (e Etcd2) Find(queryStr string, callback datastore.ResultCallback)

Find finds data in etcd

func (Etcd2) FindAndUpdate

func (e Etcd2) FindAndUpdate(queryStr string, update interface{}, callback datastore.ResultCallback)

FindAndUpdate updates data, then returns it

func (Etcd2) Remove

func (e Etcd2) Remove(queryStr string, callback datastore.NoResultCallback)

Remove removes data in etcd

func (Etcd2) Save

func (e Etcd2) Save(key string, data interface{}, callback datastore.NoResultCallback)

Save saves data in etcd

func (Etcd2) Update

func (e Etcd2) Update(queryStr string, update interface{}, callback datastore.NoResultCallback)

Update updates data in etcd

Jump to

Keyboard shortcuts

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