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 ¶
NewConn returns a fake zk.Conn implementation. Data is stored in memory, and there's a global connection lock for concurrent access.
func NewConnFromFile ¶
NewConnFromFile returns a fake zk.Conn implementation, that is seeded with the json data extracted from the input file.
Types ¶
This section is empty.