mock

package
v0.0.0-...-8429761 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: PostgreSQL Imports: 6 Imported by: 0

Documentation

Overview

Package mock is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockConnectionKepper

type MockConnectionKepper struct {
	// contains filtered or unexported fields
}

MockConnectionKepper is a mock of ConnectionKepper interface.

func NewMockConnectionKepper

func NewMockConnectionKepper(ctrl *gomock.Controller) *MockConnectionKepper

NewMockConnectionKepper creates a new mock instance.

func (*MockConnectionKepper) Discard

func (m *MockConnectionKepper) Discard(sh shard.Shard) error

Discard mocks base method.

func (*MockConnectionKepper) EXPECT

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

func (*MockConnectionKepper) Hostname

func (m *MockConnectionKepper) Hostname() string

Hostname mocks base method.

func (*MockConnectionKepper) IdleConnectionCount

func (m *MockConnectionKepper) IdleConnectionCount() int

IdleConnectionCount mocks base method.

func (*MockConnectionKepper) List

func (m *MockConnectionKepper) List() []shard.Shard

List mocks base method.

func (*MockConnectionKepper) Put

func (m *MockConnectionKepper) Put(host shard.Shard) error

Put mocks base method.

func (*MockConnectionKepper) QueueResidualSize

func (m *MockConnectionKepper) QueueResidualSize() int

QueueResidualSize mocks base method.

func (*MockConnectionKepper) RouterName

func (m *MockConnectionKepper) RouterName() string

RouterName mocks base method.

func (*MockConnectionKepper) Rule

Rule mocks base method.

func (*MockConnectionKepper) UsedConnectionCount

func (m *MockConnectionKepper) UsedConnectionCount() int

UsedConnectionCount mocks base method.

type MockConnectionKepperMockRecorder

type MockConnectionKepperMockRecorder struct {
	// contains filtered or unexported fields
}

MockConnectionKepperMockRecorder is the mock recorder for MockConnectionKepper.

func (*MockConnectionKepperMockRecorder) Discard

func (mr *MockConnectionKepperMockRecorder) Discard(sh interface{}) *gomock.Call

Discard indicates an expected call of Discard.

func (*MockConnectionKepperMockRecorder) Hostname

Hostname indicates an expected call of Hostname.

func (*MockConnectionKepperMockRecorder) IdleConnectionCount

func (mr *MockConnectionKepperMockRecorder) IdleConnectionCount() *gomock.Call

IdleConnectionCount indicates an expected call of IdleConnectionCount.

func (*MockConnectionKepperMockRecorder) List

List indicates an expected call of List.

func (*MockConnectionKepperMockRecorder) Put

func (mr *MockConnectionKepperMockRecorder) Put(host interface{}) *gomock.Call

Put indicates an expected call of Put.

func (*MockConnectionKepperMockRecorder) QueueResidualSize

func (mr *MockConnectionKepperMockRecorder) QueueResidualSize() *gomock.Call

QueueResidualSize indicates an expected call of QueueResidualSize.

func (*MockConnectionKepperMockRecorder) RouterName

func (mr *MockConnectionKepperMockRecorder) RouterName() *gomock.Call

RouterName indicates an expected call of RouterName.

func (*MockConnectionKepperMockRecorder) Rule

Rule indicates an expected call of Rule.

func (*MockConnectionKepperMockRecorder) UsedConnectionCount

func (mr *MockConnectionKepperMockRecorder) UsedConnectionCount() *gomock.Call

UsedConnectionCount indicates an expected call of UsedConnectionCount.

type MockDBPool

type MockDBPool struct {
	// contains filtered or unexported fields
}

MockDBPool is a mock of DBPool interface.

func NewMockDBPool

func NewMockDBPool(ctrl *gomock.Controller) *MockDBPool

NewMockDBPool creates a new mock instance.

func (*MockDBPool) Connection

func (m *MockDBPool) Connection(clid uint, shardKey kr.ShardKey, host string) (shard.Shard, error)

Connection mocks base method.

func (*MockDBPool) Cut

func (m *MockDBPool) Cut(host string) []shard.Shard

Cut mocks base method.

func (*MockDBPool) Discard

func (m *MockDBPool) Discard(sh shard.Shard) error

Discard mocks base method.

func (*MockDBPool) EXPECT

func (m *MockDBPool) EXPECT() *MockDBPoolMockRecorder

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

func (*MockDBPool) ForEach

func (m *MockDBPool) ForEach(cb func(shard.Shardinfo) error) error

ForEach mocks base method.

func (*MockDBPool) ForEachPool

func (m *MockDBPool) ForEachPool(cb func(pool.Pool) error) error

ForEachPool mocks base method.

func (*MockDBPool) Hostname

func (m *MockDBPool) Hostname() string

Hostname mocks base method.

func (*MockDBPool) IdleConnectionCount

func (m *MockDBPool) IdleConnectionCount() int

IdleConnectionCount mocks base method.

func (*MockDBPool) InitRule

func (m *MockDBPool) InitRule(rule *config.BackendRule) error

InitRule mocks base method.

func (*MockDBPool) List

func (m *MockDBPool) List() []shard.Shard

List mocks base method.

func (*MockDBPool) Put

func (m *MockDBPool) Put(host shard.Shard) error

Put mocks base method.

func (*MockDBPool) QueueResidualSize

func (m *MockDBPool) QueueResidualSize() int

QueueResidualSize mocks base method.

func (*MockDBPool) RouterName

func (m *MockDBPool) RouterName() string

RouterName mocks base method.

func (*MockDBPool) Rule

func (m *MockDBPool) Rule() *config.BackendRule

Rule mocks base method.

func (*MockDBPool) ShardMapping

func (m *MockDBPool) ShardMapping() map[string]*config.Shard

ShardMapping mocks base method.

func (*MockDBPool) UsedConnectionCount

func (m *MockDBPool) UsedConnectionCount() int

UsedConnectionCount mocks base method.

type MockDBPoolMockRecorder

type MockDBPoolMockRecorder struct {
	// contains filtered or unexported fields
}

MockDBPoolMockRecorder is the mock recorder for MockDBPool.

func (*MockDBPoolMockRecorder) Connection

func (mr *MockDBPoolMockRecorder) Connection(clid, shardKey, host interface{}) *gomock.Call

Connection indicates an expected call of Connection.

func (*MockDBPoolMockRecorder) Cut

func (mr *MockDBPoolMockRecorder) Cut(host interface{}) *gomock.Call

Cut indicates an expected call of Cut.

func (*MockDBPoolMockRecorder) Discard

func (mr *MockDBPoolMockRecorder) Discard(sh interface{}) *gomock.Call

Discard indicates an expected call of Discard.

func (*MockDBPoolMockRecorder) ForEach

func (mr *MockDBPoolMockRecorder) ForEach(cb interface{}) *gomock.Call

ForEach indicates an expected call of ForEach.

func (*MockDBPoolMockRecorder) ForEachPool

func (mr *MockDBPoolMockRecorder) ForEachPool(cb interface{}) *gomock.Call

ForEachPool indicates an expected call of ForEachPool.

func (*MockDBPoolMockRecorder) Hostname

func (mr *MockDBPoolMockRecorder) Hostname() *gomock.Call

Hostname indicates an expected call of Hostname.

func (*MockDBPoolMockRecorder) IdleConnectionCount

func (mr *MockDBPoolMockRecorder) IdleConnectionCount() *gomock.Call

IdleConnectionCount indicates an expected call of IdleConnectionCount.

func (*MockDBPoolMockRecorder) InitRule

func (mr *MockDBPoolMockRecorder) InitRule(rule interface{}) *gomock.Call

InitRule indicates an expected call of InitRule.

func (*MockDBPoolMockRecorder) List

func (mr *MockDBPoolMockRecorder) List() *gomock.Call

List indicates an expected call of List.

func (*MockDBPoolMockRecorder) Put

func (mr *MockDBPoolMockRecorder) Put(host interface{}) *gomock.Call

Put indicates an expected call of Put.

func (*MockDBPoolMockRecorder) QueueResidualSize

func (mr *MockDBPoolMockRecorder) QueueResidualSize() *gomock.Call

QueueResidualSize indicates an expected call of QueueResidualSize.

func (*MockDBPoolMockRecorder) RouterName

func (mr *MockDBPoolMockRecorder) RouterName() *gomock.Call

RouterName indicates an expected call of RouterName.

func (*MockDBPoolMockRecorder) Rule

func (mr *MockDBPoolMockRecorder) Rule() *gomock.Call

Rule indicates an expected call of Rule.

func (*MockDBPoolMockRecorder) ShardMapping

func (mr *MockDBPoolMockRecorder) ShardMapping() *gomock.Call

ShardMapping indicates an expected call of ShardMapping.

func (*MockDBPoolMockRecorder) UsedConnectionCount

func (mr *MockDBPoolMockRecorder) UsedConnectionCount() *gomock.Call

UsedConnectionCount indicates an expected call of UsedConnectionCount.

type MockMultiShardPool

type MockMultiShardPool struct {
	// contains filtered or unexported fields
}

MockMultiShardPool is a mock of MultiShardPool interface.

func NewMockMultiShardPool

func NewMockMultiShardPool(ctrl *gomock.Controller) *MockMultiShardPool

NewMockMultiShardPool creates a new mock instance.

func (*MockMultiShardPool) Connection

func (m *MockMultiShardPool) Connection(clid uint, shardKey kr.ShardKey, host string) (shard.Shard, error)

Connection mocks base method.

func (*MockMultiShardPool) Cut

func (m *MockMultiShardPool) Cut(host string) []shard.Shard

Cut mocks base method.

func (*MockMultiShardPool) Discard

func (m *MockMultiShardPool) Discard(sh shard.Shard) error

Discard mocks base method.

func (*MockMultiShardPool) EXPECT

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

func (*MockMultiShardPool) ForEach

func (m *MockMultiShardPool) ForEach(cb func(shard.Shardinfo) error) error

ForEach mocks base method.

func (*MockMultiShardPool) ForEachPool

func (m *MockMultiShardPool) ForEachPool(cb func(pool.Pool) error) error

ForEachPool mocks base method.

func (*MockMultiShardPool) Hostname

func (m *MockMultiShardPool) Hostname() string

Hostname mocks base method.

func (*MockMultiShardPool) IdleConnectionCount

func (m *MockMultiShardPool) IdleConnectionCount() int

IdleConnectionCount mocks base method.

func (*MockMultiShardPool) InitRule

func (m *MockMultiShardPool) InitRule(rule *config.BackendRule) error

InitRule mocks base method.

func (*MockMultiShardPool) List

func (m *MockMultiShardPool) List() []shard.Shard

List mocks base method.

func (*MockMultiShardPool) Put

func (m *MockMultiShardPool) Put(host shard.Shard) error

Put mocks base method.

func (*MockMultiShardPool) QueueResidualSize

func (m *MockMultiShardPool) QueueResidualSize() int

QueueResidualSize mocks base method.

func (*MockMultiShardPool) RouterName

func (m *MockMultiShardPool) RouterName() string

RouterName mocks base method.

func (*MockMultiShardPool) Rule

Rule mocks base method.

func (*MockMultiShardPool) UsedConnectionCount

func (m *MockMultiShardPool) UsedConnectionCount() int

UsedConnectionCount mocks base method.

type MockMultiShardPoolMockRecorder

type MockMultiShardPoolMockRecorder struct {
	// contains filtered or unexported fields
}

MockMultiShardPoolMockRecorder is the mock recorder for MockMultiShardPool.

func (*MockMultiShardPoolMockRecorder) Connection

func (mr *MockMultiShardPoolMockRecorder) Connection(clid, shardKey, host interface{}) *gomock.Call

Connection indicates an expected call of Connection.

func (*MockMultiShardPoolMockRecorder) Cut

func (mr *MockMultiShardPoolMockRecorder) Cut(host interface{}) *gomock.Call

Cut indicates an expected call of Cut.

func (*MockMultiShardPoolMockRecorder) Discard

func (mr *MockMultiShardPoolMockRecorder) Discard(sh interface{}) *gomock.Call

Discard indicates an expected call of Discard.

func (*MockMultiShardPoolMockRecorder) ForEach

func (mr *MockMultiShardPoolMockRecorder) ForEach(cb interface{}) *gomock.Call

ForEach indicates an expected call of ForEach.

func (*MockMultiShardPoolMockRecorder) ForEachPool

func (mr *MockMultiShardPoolMockRecorder) ForEachPool(cb interface{}) *gomock.Call

ForEachPool indicates an expected call of ForEachPool.

func (*MockMultiShardPoolMockRecorder) Hostname

func (mr *MockMultiShardPoolMockRecorder) Hostname() *gomock.Call

Hostname indicates an expected call of Hostname.

func (*MockMultiShardPoolMockRecorder) IdleConnectionCount

func (mr *MockMultiShardPoolMockRecorder) IdleConnectionCount() *gomock.Call

IdleConnectionCount indicates an expected call of IdleConnectionCount.

func (*MockMultiShardPoolMockRecorder) InitRule

func (mr *MockMultiShardPoolMockRecorder) InitRule(rule interface{}) *gomock.Call

InitRule indicates an expected call of InitRule.

func (*MockMultiShardPoolMockRecorder) List

List indicates an expected call of List.

func (*MockMultiShardPoolMockRecorder) Put

func (mr *MockMultiShardPoolMockRecorder) Put(host interface{}) *gomock.Call

Put indicates an expected call of Put.

func (*MockMultiShardPoolMockRecorder) QueueResidualSize

func (mr *MockMultiShardPoolMockRecorder) QueueResidualSize() *gomock.Call

QueueResidualSize indicates an expected call of QueueResidualSize.

func (*MockMultiShardPoolMockRecorder) RouterName

func (mr *MockMultiShardPoolMockRecorder) RouterName() *gomock.Call

RouterName indicates an expected call of RouterName.

func (*MockMultiShardPoolMockRecorder) Rule

Rule indicates an expected call of Rule.

func (*MockMultiShardPoolMockRecorder) UsedConnectionCount

func (mr *MockMultiShardPoolMockRecorder) UsedConnectionCount() *gomock.Call

UsedConnectionCount indicates an expected call of UsedConnectionCount.

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

func (m *MockPool) Connection(clid uint, shardKey kr.ShardKey) (shard.Shard, error)

Connection mocks base method.

func (*MockPool) Discard

func (m *MockPool) Discard(sh shard.Shard) error

Discard mocks base method.

func (*MockPool) EXPECT

func (m *MockPool) EXPECT() *MockPoolMockRecorder

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

func (*MockPool) ForEach

func (m *MockPool) ForEach(cb func(shard.Shardinfo) error) error

ForEach mocks base method.

func (*MockPool) Hostname

func (m *MockPool) Hostname() string

Hostname mocks base method.

func (*MockPool) IdleConnectionCount

func (m *MockPool) IdleConnectionCount() int

IdleConnectionCount mocks base method.

func (*MockPool) List

func (m *MockPool) List() []shard.Shard

List mocks base method.

func (*MockPool) Put

func (m *MockPool) Put(host shard.Shard) error

Put mocks base method.

func (*MockPool) QueueResidualSize

func (m *MockPool) QueueResidualSize() int

QueueResidualSize mocks base method.

func (*MockPool) RouterName

func (m *MockPool) RouterName() string

RouterName mocks base method.

func (*MockPool) Rule

func (m *MockPool) Rule() *config.BackendRule

Rule mocks base method.

func (*MockPool) UsedConnectionCount

func (m *MockPool) UsedConnectionCount() int

UsedConnectionCount mocks base method.

type MockPoolIterator

type MockPoolIterator struct {
	// contains filtered or unexported fields
}

MockPoolIterator is a mock of PoolIterator interface.

func NewMockPoolIterator

func NewMockPoolIterator(ctrl *gomock.Controller) *MockPoolIterator

NewMockPoolIterator creates a new mock instance.

func (*MockPoolIterator) EXPECT

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

func (*MockPoolIterator) ForEachPool

func (m *MockPoolIterator) ForEachPool(cb func(pool.Pool) error) error

ForEachPool mocks base method.

type MockPoolIteratorMockRecorder

type MockPoolIteratorMockRecorder struct {
	// contains filtered or unexported fields
}

MockPoolIteratorMockRecorder is the mock recorder for MockPoolIterator.

func (*MockPoolIteratorMockRecorder) ForEachPool

func (mr *MockPoolIteratorMockRecorder) ForEachPool(cb interface{}) *gomock.Call

ForEachPool indicates an expected call of ForEachPool.

type MockPoolMockRecorder

type MockPoolMockRecorder struct {
	// contains filtered or unexported fields
}

MockPoolMockRecorder is the mock recorder for MockPool.

func (*MockPoolMockRecorder) Connection

func (mr *MockPoolMockRecorder) Connection(clid, shardKey interface{}) *gomock.Call

Connection indicates an expected call of Connection.

func (*MockPoolMockRecorder) Discard

func (mr *MockPoolMockRecorder) Discard(sh interface{}) *gomock.Call

Discard indicates an expected call of Discard.

func (*MockPoolMockRecorder) ForEach

func (mr *MockPoolMockRecorder) ForEach(cb interface{}) *gomock.Call

ForEach indicates an expected call of ForEach.

func (*MockPoolMockRecorder) Hostname

func (mr *MockPoolMockRecorder) Hostname() *gomock.Call

Hostname indicates an expected call of Hostname.

func (*MockPoolMockRecorder) IdleConnectionCount

func (mr *MockPoolMockRecorder) IdleConnectionCount() *gomock.Call

IdleConnectionCount indicates an expected call of IdleConnectionCount.

func (*MockPoolMockRecorder) List

func (mr *MockPoolMockRecorder) List() *gomock.Call

List indicates an expected call of List.

func (*MockPoolMockRecorder) Put

func (mr *MockPoolMockRecorder) Put(host interface{}) *gomock.Call

Put indicates an expected call of Put.

func (*MockPoolMockRecorder) QueueResidualSize

func (mr *MockPoolMockRecorder) QueueResidualSize() *gomock.Call

QueueResidualSize indicates an expected call of QueueResidualSize.

func (*MockPoolMockRecorder) RouterName

func (mr *MockPoolMockRecorder) RouterName() *gomock.Call

RouterName indicates an expected call of RouterName.

func (*MockPoolMockRecorder) Rule

func (mr *MockPoolMockRecorder) Rule() *gomock.Call

Rule indicates an expected call of Rule.

func (*MockPoolMockRecorder) UsedConnectionCount

func (mr *MockPoolMockRecorder) UsedConnectionCount() *gomock.Call

UsedConnectionCount indicates an expected call of UsedConnectionCount.

Jump to

Keyboard shortcuts

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