Documentation ¶
Overview ¶
Package client is a generated GoMock package.
Package client is a generated GoMock package.
Package client is a generated GoMock package.
Package client is a generated GoMock package.
Index ¶
- Constants
- Variables
- type Client
- type ExecuteResult
- type HostAddress
- type MockClient
- type MockClientMockRecorder
- type MockPool
- func (m *MockPool) Close() error
- func (m *MockPool) EXPECT() *MockPoolMockRecorder
- func (m *MockPool) Execute(statement string) (Response, error)
- func (m *MockPool) ExecuteChan(statement string) (<-chan ExecuteResult, bool)
- func (m *MockPool) GetClient(opts ...Option) (Client, error)
- func (m *MockPool) Open() error
- type MockPoolMockRecorder
- func (mr *MockPoolMockRecorder) Close() *gomock.Call
- func (mr *MockPoolMockRecorder) Execute(statement interface{}) *gomock.Call
- func (mr *MockPoolMockRecorder) ExecuteChan(statement interface{}) *gomock.Call
- func (mr *MockPoolMockRecorder) GetClient(opts ...interface{}) *gomock.Call
- func (mr *MockPoolMockRecorder) Open() *gomock.Call
- type MockResponse
- func (m *MockResponse) EXPECT() *MockResponseMockRecorder
- func (m *MockResponse) GetError() error
- func (m *MockResponse) GetLatency() time.Duration
- func (m *MockResponse) GetRespTime() time.Duration
- func (m *MockResponse) IsPermanentError() bool
- func (m *MockResponse) IsRetryMoreError() bool
- func (m *MockResponse) IsSucceed() bool
- type MockResponseMockRecorder
- func (mr *MockResponseMockRecorder) GetError() *gomock.Call
- func (mr *MockResponseMockRecorder) GetLatency() *gomock.Call
- func (mr *MockResponseMockRecorder) GetRespTime() *gomock.Call
- func (mr *MockResponseMockRecorder) IsPermanentError() *gomock.Call
- func (mr *MockResponseMockRecorder) IsRetryMoreError() *gomock.Call
- func (mr *MockResponseMockRecorder) IsSucceed() *gomock.Call
- type MockSession
- type MockSessionMockRecorder
- type NewSessionFunc
- type Option
- func WithAddress(addresses ...string) Option
- func WithClientInitFunc(fn func(Client) error) Option
- func WithConcurrencyPerAddress(concurrencyPerAddress int) Option
- func WithLogger(l logger.Logger) Option
- func WithNewSessionFunc(fn NewSessionFunc) Option
- func WithPassword(password string) Option
- func WithQueueSize(queueSize int) Option
- func WithReconnectInitialInterval(interval time.Duration) Option
- func WithRetry(retry int) Option
- func WithRetryInitialInterval(interval time.Duration) Option
- func WithTLSConfig(tlsConfig *tls.Config) Option
- func WithUser(user string) Option
- func WithUserPassword(user, password string) Option
- func WithV3() Option
- type Pool
- type Response
- type Session
Constants ¶
const ( DefaultUser = "root" DefaultPassword = "nebula" DefaultReconnectInitialInterval = time.Second DefaultReconnectMaxInterval = 2 * time.Minute DefaultRetry = 3 DefaultRetryInitialInterval = time.Second DefaultRetryMaxInterval = 2 * time.Minute DefaultRetryRandomizationFactor = 0.1 DefaultRetryMultiplier = 1.5 DefaultRetryMaxElapsedTime = time.Hour DefaultConcurrencyPerAddress = 10 DefaultQueueSize = 1000 )
Variables ¶
var ErrClosed = stderrors.New("client closed")
Functions ¶
This section is empty.
Types ¶
type ExecuteResult ¶
type HostAddress ¶
type MockClient ¶
type MockClient struct {
// contains filtered or unexported fields
}
MockClient is a mock of Client interface.
func NewMockClient ¶
func NewMockClient(ctrl *gomock.Controller) *MockClient
NewMockClient creates a new mock instance.
func (*MockClient) EXPECT ¶
func (m *MockClient) EXPECT() *MockClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockClientMockRecorder ¶
type MockClientMockRecorder struct {
// contains filtered or unexported fields
}
MockClientMockRecorder is the mock recorder for MockClient.
func (*MockClientMockRecorder) Close ¶
func (mr *MockClientMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close.
func (*MockClientMockRecorder) Execute ¶
func (mr *MockClientMockRecorder) Execute(statement interface{}) *gomock.Call
Execute indicates an expected call of Execute.
func (*MockClientMockRecorder) Open ¶
func (mr *MockClientMockRecorder) Open() *gomock.Call
Open indicates an expected call of Open.
type MockPool ¶
type MockPool struct {
// contains filtered or unexported fields
}
MockPool is a mock of Pool interface.
func NewMockPool ¶
func NewMockPool(ctrl *gomock.Controller) *MockPool
NewMockPool creates a new mock instance.
func (*MockPool) EXPECT ¶
func (m *MockPool) EXPECT() *MockPoolMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockPool) ExecuteChan ¶
func (m *MockPool) ExecuteChan(statement string) (<-chan ExecuteResult, bool)
ExecuteChan mocks base method.
type MockPoolMockRecorder ¶
type MockPoolMockRecorder struct {
// contains filtered or unexported fields
}
MockPoolMockRecorder is the mock recorder for MockPool.
func (*MockPoolMockRecorder) Close ¶
func (mr *MockPoolMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close.
func (*MockPoolMockRecorder) Execute ¶
func (mr *MockPoolMockRecorder) Execute(statement interface{}) *gomock.Call
Execute indicates an expected call of Execute.
func (*MockPoolMockRecorder) ExecuteChan ¶
func (mr *MockPoolMockRecorder) ExecuteChan(statement interface{}) *gomock.Call
ExecuteChan indicates an expected call of ExecuteChan.
func (*MockPoolMockRecorder) GetClient ¶
func (mr *MockPoolMockRecorder) GetClient(opts ...interface{}) *gomock.Call
GetClient indicates an expected call of GetClient.
func (*MockPoolMockRecorder) Open ¶
func (mr *MockPoolMockRecorder) Open() *gomock.Call
Open indicates an expected call of Open.
type MockResponse ¶
type MockResponse struct {
// contains filtered or unexported fields
}
MockResponse is a mock of Response interface.
func NewMockResponse ¶
func NewMockResponse(ctrl *gomock.Controller) *MockResponse
NewMockResponse creates a new mock instance.
func (*MockResponse) EXPECT ¶
func (m *MockResponse) EXPECT() *MockResponseMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockResponse) GetLatency ¶
func (m *MockResponse) GetLatency() time.Duration
GetLatency mocks base method.
func (*MockResponse) GetRespTime ¶
func (m *MockResponse) GetRespTime() time.Duration
GetRespTime mocks base method.
func (*MockResponse) IsPermanentError ¶
func (m *MockResponse) IsPermanentError() bool
IsPermanentError mocks base method.
func (*MockResponse) IsRetryMoreError ¶
func (m *MockResponse) IsRetryMoreError() bool
IsRetryMoreError mocks base method.
func (*MockResponse) IsSucceed ¶
func (m *MockResponse) IsSucceed() bool
IsSucceed mocks base method.
type MockResponseMockRecorder ¶
type MockResponseMockRecorder struct {
// contains filtered or unexported fields
}
MockResponseMockRecorder is the mock recorder for MockResponse.
func (*MockResponseMockRecorder) GetError ¶
func (mr *MockResponseMockRecorder) GetError() *gomock.Call
GetError indicates an expected call of GetError.
func (*MockResponseMockRecorder) GetLatency ¶
func (mr *MockResponseMockRecorder) GetLatency() *gomock.Call
GetLatency indicates an expected call of GetLatency.
func (*MockResponseMockRecorder) GetRespTime ¶
func (mr *MockResponseMockRecorder) GetRespTime() *gomock.Call
GetRespTime indicates an expected call of GetRespTime.
func (*MockResponseMockRecorder) IsPermanentError ¶
func (mr *MockResponseMockRecorder) IsPermanentError() *gomock.Call
IsPermanentError indicates an expected call of IsPermanentError.
func (*MockResponseMockRecorder) IsRetryMoreError ¶
func (mr *MockResponseMockRecorder) IsRetryMoreError() *gomock.Call
IsRetryMoreError indicates an expected call of IsRetryMoreError.
func (*MockResponseMockRecorder) IsSucceed ¶
func (mr *MockResponseMockRecorder) IsSucceed() *gomock.Call
IsSucceed indicates an expected call of IsSucceed.
type MockSession ¶
type MockSession struct {
// contains filtered or unexported fields
}
MockSession is a mock of Session interface.
func NewMockSession ¶
func NewMockSession(ctrl *gomock.Controller) *MockSession
NewMockSession creates a new mock instance.
func (*MockSession) EXPECT ¶
func (m *MockSession) EXPECT() *MockSessionMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockSessionMockRecorder ¶
type MockSessionMockRecorder struct {
// contains filtered or unexported fields
}
MockSessionMockRecorder is the mock recorder for MockSession.
func (*MockSessionMockRecorder) Close ¶
func (mr *MockSessionMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close.
func (*MockSessionMockRecorder) Execute ¶
func (mr *MockSessionMockRecorder) Execute(statement interface{}) *gomock.Call
Execute indicates an expected call of Execute.
func (*MockSessionMockRecorder) Open ¶
func (mr *MockSessionMockRecorder) Open() *gomock.Call
Open indicates an expected call of Open.
type NewSessionFunc ¶
type NewSessionFunc func(HostAddress) Session
type Option ¶
type Option func(*options)
func WithAddress ¶
func WithClientInitFunc ¶
func WithLogger ¶
func WithNewSessionFunc ¶
func WithNewSessionFunc(fn NewSessionFunc) Option