Documentation ¶
Index ¶
- func NewZKDriver(servers []string, options ...DriverOption) driver.Driver
- type Driver
- func (d *Driver) Children(path string) ([]string, error)
- func (d *Driver) Close() error
- func (d *Driver) Delete(path string) error
- func (d *Driver) IsConnected() bool
- func (d *Driver) Open() error
- func (d *Driver) Read(path string) ([]byte, error)
- func (d *Driver) State() zk.State
- func (d *Driver) Watch(path string) ([]byte, <-chan *driver.Event, error)
- func (d *Driver) WatchChildren(path string) ([]string, <-chan *driver.Event, error)
- func (d *Driver) Write(path string, data []byte) error
- type DriverOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewZKDriver ¶
func NewZKDriver(servers []string, options ...DriverOption) driver.Driver
NewZKDriver returns new zookeeper driver
Types ¶
type Driver ¶ added in v1.1.0
type Driver struct {
// contains filtered or unexported fields
}
Driver defines zookeeper driver for Albus
func (*Driver) IsConnected ¶ added in v1.1.0
func (*Driver) Read ¶ added in v1.1.0
Read reads the content from the path and returns the value in bytes
func (*Driver) WatchChildren ¶ added in v1.1.0
type DriverOption ¶ added in v1.1.0
type DriverOption func(*Driver)
func WithACL ¶ added in v1.1.0
func WithACL(acl []zk.ACL) DriverOption
func WithRootDirectory ¶ added in v1.1.0
func WithRootDirectory(root string) DriverOption
func WithTimeout ¶ added in v1.1.0
func WithTimeout(timeout time.Duration) DriverOption
Click to show internal directories.
Click to hide internal directories.