fakezk

package
v2.0.0-alpha1+incompat... Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2015 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Overview

Package fakezk is a pretty complete mock implementation of a Zookeper connection (see go/zk/zk.Conn). All operations work as expected with the exceptions of zk.Conn.ACL and zk.Conn.SetACL. zk.Conn.SetACL will succeed, but it is a noop (and the ACLs won't be respected). zk.Conn.ACL will panic. It is OK to access the connection from multiple goroutines, but the locking is very naive (every operation locks the whole connection).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConn

func NewConn() zk.Conn

NewConn returns a fake zk.Conn implementation. Data is stored in memory, and there's a global connection lock for concurrent access.

func NewConnFromFile

func NewConnFromFile(filename string) zk.Conn

NewConnFromFile returns a fake zk.Conn implementation, that is seeded with the json data extracted from the input file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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