etcd

package
v0.0.0-...-e0071fa Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2018 License: BSD-3-Clause Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

type Conn struct {
	Client *etcd.Client
}

func Connet

func Connet(machines []string) *Conn

func InitClient

func InitClient(machines []string, dir, key, value string, ttl time.Duration) (conn *Conn, err error)

func (*Conn) CompareAndSwap

func (c *Conn) CompareAndSwap(key, old, nw string, ttl time.Duration) error

func (*Conn) Create

func (c *Conn) Create(key, value string, ttl time.Duration) error

func (*Conn) Get

func (c *Conn) Get(key string) (string, error)

func (*Conn) GetAll

func (c *Conn) GetAll(key string) (etcd.Nodes, error)

func (*Conn) IntervalUpdate

func (c *Conn) IntervalUpdate(key, value string, interval time.Duration) (stop chan bool)

func (*Conn) Set

func (c *Conn) Set(key, value string, ttl time.Duration) error

func (*Conn) Watch

func (c *Conn) Watch(key string) (receiver chan *etcd.Response, stop chan bool)

func (*Conn) WatchAll

func (c *Conn) WatchAll(key string, receiver chan *etcd.Response) (stop chan bool)

func (*Conn) WatchByBuff

func (c *Conn) WatchByBuff(key string, buffer int) (receiver chan *etcd.Response, stop chan bool)

func (*Conn) WatchByChan

func (c *Conn) WatchByChan(key string, receiver chan *etcd.Response) (stop chan bool)

Jump to

Keyboard shortcuts

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