curatorext

package
v0.0.0-...-78fbe0a Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2019 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertEmpty

func AssertEmpty(client curator.CuratorFramework, fullPath string) error

func AssertExists

func AssertExists(client curator.CuratorFramework, fullPath string) error

func ByteArrayDeserializer

func ByteArrayDeserializer(ctx *thriftext.ThreadCtx, raw []byte, constructor Constructor) (interface{}, error)

func ByteArraySerializer

func ByteArraySerializer(ctx *thriftext.ThreadCtx, val interface{}) ([]byte, error)

just casting

func CreateEphemeralSequential

func CreateEphemeralSequential(root string, framework curator.CuratorFramework) thriftext.SetBytes

func CreateWithParents

func CreateWithParents(client curator.CuratorFramework, mode curator.CreateMode, root string, data []byte) error

func IntDeserializer

func IntDeserializer(ctx *thriftext.ThreadCtx, raw []byte, constructor Constructor) (interface{}, error)

func IntSerializer

func IntSerializer(ctx *thriftext.ThreadCtx, val interface{}) ([]byte, error)

func IsSubdirectory

func IsSubdirectory(root string, otherPath string) bool

func LoadThrift

func LoadThrift(ctx *thriftext.ThreadCtx, path string, client curator.CuratorFramework, tStruct thrift.TStruct) error

func StringDeserializer

func StringDeserializer(ctx *thriftext.ThreadCtx, raw []byte, constructor Constructor) (interface{}, error)

func StringSerializer

func StringSerializer(ctx *thriftext.ThreadCtx, val interface{}) ([]byte, error)

func TDeserializer

func TDeserializer(ctx *thriftext.ThreadCtx, raw []byte, constructor Constructor) (interface{}, error)

func TSerializer

func TSerializer(ctx *thriftext.ThreadCtx, val interface{}) ([]byte, error)

func WaitUntilOrErr

func WaitUntilOrErr(expectTrue func() bool) error

Types

type ChildLoader

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

func (*ChildLoader) ChildEvent

func (p *ChildLoader) ChildEvent(client curator.CuratorFramework, event cache.TreeCacheEvent) error

type Constructor

type Constructor func() interface{}

type Deserializer

type Deserializer func(ctx *thriftext.ThreadCtx, raw []byte, constructor Constructor) (interface{}, error)

type Loader

type Loader func(ctx *thriftext.ThreadCtx, client curator.CuratorFramework, listener thriftext.DataChangeNotifier, path string) (interface{}, error)

type ObjLoader

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

func (*ObjLoader) ChildEvent

func (p *ObjLoader) ChildEvent(client curator.CuratorFramework, event cache.TreeCacheEvent) error

type Serializer

type Serializer func(ctx *thriftext.ThreadCtx, val interface{}) ([]byte, error)

type Updater

type Updater func(interface{}) interface{}

Note: update() should not modify its argument

type ZkWatchedMap

type ZkWatchedMap struct {
	Root string
	// contains filtered or unexported fields
}

func NewZkWatchedMap

func NewZkWatchedMap(
	client curator.CuratorFramework,
	initialize bool,
	root string,
	listener thriftext.DataChangeNotifier,
	loader Loader) (*ZkWatchedMap, error)

func (*ZkWatchedMap) Contains

func (p *ZkWatchedMap) Contains(key string) bool

func (*ZkWatchedMap) Get

func (p *ZkWatchedMap) Get(key string) interface{}

func (*ZkWatchedMap) KeySet

func (p *ZkWatchedMap) KeySet() []string

func (*ZkWatchedMap) Values

func (p *ZkWatchedMap) Values() []interface{}

func (*ZkWatchedMap) WaitUntilContains

func (p *ZkWatchedMap) WaitUntilContains(key string) error

type ZkWatchedNode

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

func LoadBytesWatchedNode

func LoadBytesWatchedNode(client curator.CuratorFramework, path string) (*ZkWatchedNode, error)

func LoadIntWatchedNode

func LoadIntWatchedNode(client curator.CuratorFramework, path string) (*ZkWatchedNode, error)

func LoadStringWatchedNode

func LoadStringWatchedNode(client curator.CuratorFramework, path string, requireData bool) (*ZkWatchedNode, error)

func LoadThriftWatchedNode

func LoadThriftWatchedNode(client curator.CuratorFramework,
	path string,
	constructor Constructor) (*ZkWatchedNode, error)

func LoadZkWatchedNode

func LoadZkWatchedNode(client curator.CuratorFramework, path string, constructor Constructor, serializer Serializer, deserializer Deserializer, requireData bool) (*ZkWatchedNode, error)

func NewBytesWatchedNode

func NewBytesWatchedNode(client curator.CuratorFramework, mode curator.CreateMode, path string, initialValue []byte) (*ZkWatchedNode, error)

func NewIntWatchedNode

func NewIntWatchedNode(client curator.CuratorFramework, mode curator.CreateMode, path string, initialValue int) (*ZkWatchedNode, error)

func NewStringWatchedNode

func NewStringWatchedNode(client curator.CuratorFramework, mode curator.CreateMode, path string, initialValue string) (*ZkWatchedNode, error)

func NewThriftWatchedNode

func NewThriftWatchedNode(client curator.CuratorFramework,
	mode curator.CreateMode,
	path string,
	ctx *thriftext.ThreadCtx,
	constructor Constructor,
	initialValue thrift.TStruct) (*ZkWatchedNode, error)

func NewZkWatchedNode

func NewZkWatchedNode(
	client curator.CuratorFramework,
	mode curator.CreateMode,
	path string,
	data []byte,
	constuctor Constructor,
	serializer Serializer,
	deserializer Deserializer) (*ZkWatchedNode, error)

func (*ZkWatchedNode) AddListener

func (p *ZkWatchedNode) AddListener(listener thriftext.DataListener)

func (*ZkWatchedNode) Delete

func (p *ZkWatchedNode) Delete() error

func (*ZkWatchedNode) Get

func (p *ZkWatchedNode) Get() interface{}

func (*ZkWatchedNode) Set

func (p *ZkWatchedNode) Set(ctx *thriftext.ThreadCtx,
	value interface{}) error

func (*ZkWatchedNode) Update

func (p *ZkWatchedNode) Update(ctx *thriftext.ThreadCtx, updater Updater) (interface{}, error)

Jump to

Keyboard shortcuts

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