zoohandler

package
v0.0.0-...-eb6d389 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2016 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BrokerInfo

type BrokerInfo struct {
	Id      int    `xml:"-"`
	JmxPort int64  `xml:"jmx_port"`
	Host    string `xml:"host"`
	Version int    `xml:"version"`
	Port    int    `xml:"port"`
}

func (BrokerInfo) Addr

func (bi BrokerInfo) Addr() string

type BrokerList

type BrokerList []BrokerInfo

func (BrokerList) Strings

func (bl BrokerList) Strings() []string

type Node

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

func (Node) Child

func (node Node) Child(name string) (Node, error)

func (Node) FullPath

func (node Node) FullPath() string

func (Node) Get

func (node Node) Get(setWatch bool) NodeResult

func (Node) GetChildren

func (node Node) GetChildren(setWatch bool) NodeResult

func (Node) Name

func (node Node) Name() string

func (Node) NumberName

func (node Node) NumberName() (int64, bool)

func (Node) Parent

func (node Node) Parent() (Node, error)

func (Node) Path

func (node Node) Path() string

func (Node) Root

func (node Node) Root() bool

func (*Node) Sequence

func (node *Node) Sequence() (int64, bool)

type NodeResult

type NodeResult struct {
	Node
	Op       string
	Err      error
	Stat     *zk.Stat
	Watch    <-chan zk.Event
	Data     []byte
	Children []Node
	ChildMap map[string]Node
}

func (NodeResult) Error

func (nr NodeResult) Error() string

func (NodeResult) Json

func (nr NodeResult) Json(obj interface{}) error

type RequestType

type RequestType byte

type ZooHandler

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

func New

func New(peers []string, logger *log.Logger) (*ZooHandler, error)

func (*ZooHandler) Close

func (zh *ZooHandler) Close()

func (*ZooHandler) GetKafkaBrokers

func (zh *ZooHandler) GetKafkaBrokers() (BrokerList, error)

func (*ZooHandler) NewNode

func (zh *ZooHandler) NewNode(fullpath string) (Node, error)

Jump to

Keyboard shortcuts

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