Documentation
¶
Index ¶
- func HaveZnode(path string) OmegaMatcher
- func HaveZnodeData(path string, data []byte) OmegaMatcher
- func MatchEvent(eventType zk.EventType, eventState zk.State) OmegaMatcher
- func ZkCollectEvents(count int, evntChn <-chan zk.Event) []zk.Event
- func ZkConnect(zkHosts []string, zkSessionTimeout time.Duration, ...) (client *Client)
- func ZkCreatePaths(client *Client, paths ...string)
- func ZkDeletePaths(client *Client, paths ...string)
- func ZkUniqueNodeName() string
- type EventMatcher
- type HaveZnodeDataMatcher
- type HaveZnodeMatcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HaveZnodeData ¶
func ZkCollectEvents ¶
Collects go-zookeeper events.
func ZkConnect ¶
func ZkConnect(zkHosts []string, zkSessionTimeout time.Duration, zkWaitForSessionTimeout time.Duration) (client *Client)
Create client connection to zk with timeout.
func ZkCreatePaths ¶
func ZkCreatePaths(client *Client, paths ...string)
Create paths (without children) in zk.
func ZkDeletePaths ¶
func ZkDeletePaths(client *Client, paths ...string)
Delete paths (without children) in zk.
func ZkUniqueNodeName ¶
func ZkUniqueNodeName() string
Generates a unique string suitable for using as a node name.
Types ¶
type EventMatcher ¶
Custom gomega matcher: zk event is the expected type with the expected state.
func (*EventMatcher) FailureMessage ¶
func (matcher *EventMatcher) FailureMessage(actual interface{}) (message string)
func (*EventMatcher) Match ¶
func (matcher *EventMatcher) Match(actual interface{}) (success bool, err error)
func (*EventMatcher) NegatedFailureMessage ¶
func (matcher *EventMatcher) NegatedFailureMessage(actual interface{}) (message string)
type HaveZnodeDataMatcher ¶
Custom gomega matcher: validates zk node data.
func (*HaveZnodeDataMatcher) FailureMessage ¶
func (matcher *HaveZnodeDataMatcher) FailureMessage(actual interface{}) (message string)
func (*HaveZnodeDataMatcher) Match ¶
func (matcher *HaveZnodeDataMatcher) Match(actual interface{}) (success bool, err error)
func (*HaveZnodeDataMatcher) NegatedFailureMessage ¶
func (matcher *HaveZnodeDataMatcher) NegatedFailureMessage(actual interface{}) (message string)
type HaveZnodeMatcher ¶
type HaveZnodeMatcher struct {
Path string
}
Custom gomega matcher: validates zk node exists.
func (*HaveZnodeMatcher) FailureMessage ¶
func (matcher *HaveZnodeMatcher) FailureMessage(actual interface{}) (message string)
func (*HaveZnodeMatcher) Match ¶
func (matcher *HaveZnodeMatcher) Match(actual interface{}) (success bool, err error)
func (*HaveZnodeMatcher) NegatedFailureMessage ¶
func (matcher *HaveZnodeMatcher) NegatedFailureMessage(actual interface{}) (message string)
Click to show internal directories.
Click to hide internal directories.