client

package
v0.0.0-...-3cbc9b2 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2015 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Path

func Path(dir string, name string) string

Types

type Client

type Client struct {
	Tag int
	// contains filtered or unexported fields
}

func New

func New(addrArray []string) *Client

Creates a new server.

func (*Client) Add

func (c *Client) Add(path string, num int) *Response

func (*Client) Close

func (c *Client) Close()

func (*Client) CreateInt

func (c *Client) CreateInt(path string, value int) *Response

func (*Client) Del

func (c *Client) Del(path string) *Response

func (*Client) Get

func (c *Client) Get(path string) *Response

func (*Client) GetAndWatch

func (c *Client) GetAndWatch(path string, immediately bool, notify WatchNotify)

func (*Client) GetList

func (c *Client) GetList(path string) *Response

func (*Client) Inc

func (c *Client) Inc(path string) *Response

func (*Client) Lock

func (c *Client) Lock(path string)

func (*Client) MkDir

func (c *Client) MkDir(path string, value string) *Response

func (*Client) MkFile

func (c *Client) MkFile(path string, value string) *Response

func (*Client) MkFileTmp

func (c *Client) MkFileTmp(path string, value string) *Response

func (*Client) MkFileWithVerb

func (c *Client) MkFileWithVerb(path string, value string, v Verb) *Response

func (*Client) Name

func (c *Client) Name() string

func (*Client) RemoveWatch

func (c *Client) RemoveWatch(path string) *Response

func (*Client) Set

func (c *Client) Set(path string, value string) *Response

func (*Client) Start

func (c *Client) Start()

Get the server list.

func (*Client) ULock

func (c *Client) ULock(path string)

func (*Client) Watch

func (c *Client) Watch(path string, immediately bool, notify WatchNotify) *Response

type MsgSendType

type MsgSendType int

type WatchNotify

type WatchNotify func(path string, value string, verb Verb, stopWatch *bool)

watch verb is Verb_Create | Verb_Set | Verb_Del

Jump to

Keyboard shortcuts

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