Documentation ¶
Overview ¶
Package zk is a generated GoMock package.
Index ¶
- type Conn
- type ConnConfig
- type MockConn
- func (m *MockConn) Children(path string) ([]string, *zk.Stat, error)
- func (m *MockConn) ChildrenW(path string) ([]string, *zk.Stat, <-chan zk.Event, error)
- func (m *MockConn) Close()
- func (m *MockConn) CreateRecursively(p string, data []byte) error
- func (m *MockConn) DeleteWithChildren(pathcur string) error
- func (m *MockConn) EXPECT() *MockConnMockRecorder
- func (m *MockConn) Exists(path string) (bool, *zk.Stat, error)
- func (m *MockConn) Get(path string) ([]byte, *zk.Stat, error)
- func (m *MockConn) GetW(path string) ([]byte, *zk.Stat, <-chan zk.Event, error)
- func (m *MockConn) Update() <-chan zk.Event
- type MockConnMockRecorder
- func (mr *MockConnMockRecorder) Children(path interface{}) *gomock.Call
- func (mr *MockConnMockRecorder) ChildrenW(path interface{}) *gomock.Call
- func (mr *MockConnMockRecorder) Close() *gomock.Call
- func (mr *MockConnMockRecorder) CreateRecursively(p, data interface{}) *gomock.Call
- func (mr *MockConnMockRecorder) DeleteWithChildren(pathcur interface{}) *gomock.Call
- func (mr *MockConnMockRecorder) Exists(path interface{}) *gomock.Call
- func (mr *MockConnMockRecorder) Get(path interface{}) *gomock.Call
- func (mr *MockConnMockRecorder) GetW(path interface{}) *gomock.Call
- func (mr *MockConnMockRecorder) Update() *gomock.Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn interface { Get(path string) ([]byte, *zk.Stat, error) GetW(path string) ([]byte, *zk.Stat, <-chan zk.Event, error) Children(path string) ([]string, *zk.Stat, error) ChildrenW(path string) ([]string, *zk.Stat, <-chan zk.Event, error) Exists(path string) (bool, *zk.Stat, error) CreateRecursively(p string, data []byte) error DeleteWithChildren(pathcur string) error Update() <-chan zk.Event Close() }
Conn is a zk connection wrapper.
func CreateConn ¶
func CreateConn(cfg *ConnConfig, waitConnected bool) (Conn, error)
CreateConn creates zk connection and connects it
type ConnConfig ¶
type ConnConfig struct { Hosts []string `yaml:"hosts"` User string `yaml:"user"` Pwd string `yaml:"pwd"` ConnectTimeout time.Duration `yaml:"connect_timeout"` SessionTimeout time.Duration `yaml:"session_timeout"` BasePath string `yaml:"base_path"` }
ConnConfig contains all zk connection configurations.
type MockConn ¶
type MockConn struct {
// contains filtered or unexported fields
}
MockConn is a mock of Conn interface
func NewMockConn ¶
func NewMockConn(ctrl *gomock.Controller) *MockConn
NewMockConn creates a new mock instance
func (*MockConn) CreateRecursively ¶
CreateRecursively mocks base method
func (*MockConn) DeleteWithChildren ¶
DeleteWithChildren mocks base method
func (*MockConn) EXPECT ¶
func (m *MockConn) EXPECT() *MockConnMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockConnMockRecorder ¶
type MockConnMockRecorder struct {
// contains filtered or unexported fields
}
MockConnMockRecorder is the mock recorder for MockConn
func (*MockConnMockRecorder) Children ¶
func (mr *MockConnMockRecorder) Children(path interface{}) *gomock.Call
Children indicates an expected call of Children
func (*MockConnMockRecorder) ChildrenW ¶
func (mr *MockConnMockRecorder) ChildrenW(path interface{}) *gomock.Call
ChildrenW indicates an expected call of ChildrenW
func (*MockConnMockRecorder) Close ¶
func (mr *MockConnMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close
func (*MockConnMockRecorder) CreateRecursively ¶
func (mr *MockConnMockRecorder) CreateRecursively(p, data interface{}) *gomock.Call
CreateRecursively indicates an expected call of CreateRecursively
func (*MockConnMockRecorder) DeleteWithChildren ¶
func (mr *MockConnMockRecorder) DeleteWithChildren(pathcur interface{}) *gomock.Call
DeleteWithChildren indicates an expected call of DeleteWithChildren
func (*MockConnMockRecorder) Exists ¶
func (mr *MockConnMockRecorder) Exists(path interface{}) *gomock.Call
Exists indicates an expected call of Exists
func (*MockConnMockRecorder) Get ¶
func (mr *MockConnMockRecorder) Get(path interface{}) *gomock.Call
Get indicates an expected call of Get
func (*MockConnMockRecorder) GetW ¶
func (mr *MockConnMockRecorder) GetW(path interface{}) *gomock.Call
GetW indicates an expected call of GetW
func (*MockConnMockRecorder) Update ¶
func (mr *MockConnMockRecorder) Update() *gomock.Call
Update indicates an expected call of Update