etcd

package
v0.0.0-...-b41ccf1 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2015 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sync

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

Sync is struct for etcd based sync

func NewSync

func NewSync(etcdServers []string) *Sync

NewSync initialize new etcd sync

func (*Sync) Delete

func (s *Sync) Delete(key string) error

Delete sync update sync

func (*Sync) Fetch

func (s *Sync) Fetch(key string) (interface{}, error)

Fetch data from sync

func (*Sync) HasLock

func (s *Sync) HasLock(path string) bool

HasLock checks current process owns lock or not

func (*Sync) Lock

func (s *Sync) Lock(path string, block bool) error

Lock locks resources on sync This call blocks until you can get lock

func (*Sync) Unlock

func (s *Sync) Unlock(path string) error

Unlock path

func (*Sync) Update

func (s *Sync) Update(key, jsonString string) error

Update sync update sync

func (*Sync) Watch

func (s *Sync) Watch(path string, responseChan chan *sync.Event, stopChan chan bool) error

Watch keep watch update under the path

Jump to

Keyboard shortcuts

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