backends

package
v0.0.0-...-6718c53 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2016 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ZKLock = new(sync.RWMutex)
)

Functions

func NewZKConn

func NewZKConn(zkHost []string, auth string, timeout time.Duration) error

Types

type AppNode

type AppNode struct {
	HostName string `json:"hostname"`
	Node     string `json:"node"`
}

type ZKConn

type ZKConn struct {
	*zk.Conn
	Auth      string
	EventChan <-chan zk.Event
}

func ZKClient

func ZKClient() ZKConn

func (*ZKConn) NewNode

func (conn *ZKConn) NewNode(path string, value string) error

func (*ZKConn) RemoveNode

func (conn *ZKConn) RemoveNode(path string) error

func (*ZKConn) Watch

func (conn *ZKConn) Watch(appId string, handler handlers.NodeHandler, quit *chan string)

Jump to

Keyboard shortcuts

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