zk

package
v0.0.0-...-ee9fa08 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package zk is a generated GoMock package.

Index

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) Children

func (m *MockConn) Children(path string) ([]string, *zk.Stat, error)

Children mocks base method

func (*MockConn) ChildrenW

func (m *MockConn) ChildrenW(path string) ([]string, *zk.Stat, <-chan zk.Event, error)

ChildrenW mocks base method

func (*MockConn) Close

func (m *MockConn) Close()

Close mocks base method

func (*MockConn) CreateRecursively

func (m *MockConn) CreateRecursively(p string, data []byte) error

CreateRecursively mocks base method

func (*MockConn) DeleteWithChildren

func (m *MockConn) DeleteWithChildren(pathcur string) error

DeleteWithChildren mocks base method

func (*MockConn) EXPECT

func (m *MockConn) EXPECT() *MockConnMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockConn) Exists

func (m *MockConn) Exists(path string) (bool, *zk.Stat, error)

Exists mocks base method

func (*MockConn) Get

func (m *MockConn) Get(path string) ([]byte, *zk.Stat, error)

Get mocks base method

func (*MockConn) GetW

func (m *MockConn) GetW(path string) ([]byte, *zk.Stat, <-chan zk.Event, error)

GetW mocks base method

func (*MockConn) Update

func (m *MockConn) Update() <-chan zk.Event

Update mocks base method

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

Jump to

Keyboard shortcuts

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