Documentation ¶
Overview ¶
Package common is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionOptions ¶
type ConnectionOptions interface { // SetConnectTimeout sets the connect timeout. SetConnectTimeout(value time.Duration) ConnectionOptions // ConnectTimeout returns the connect timeout. ConnectTimeout() time.Duration // SetConnectionKeepAlive sets the connection keepalive. SetConnectionKeepAlive(value bool) ConnectionOptions // ConnectionKeepAlive returns the connection keepAlive. ConnectionKeepAlive() bool // SetConnectionWriteTimeout sets the connection write timeout. SetConnectionWriteTimeout(value time.Duration) ConnectionOptions // ConnectionWriteTimeout returns the connection write timeout. ConnectionWriteTimeout() time.Duration // SetReconnectRetryOptions sets the reconnect retry options. SetReconnectRetryOptions(value retry.Options) ConnectionOptions // ReconnectRetryOptions returns the reconnect retry options. ReconnectRetryOptions() retry.Options }
ConnectionOptions provide a set of connection options.
func NewConnectionOptions ¶
func NewConnectionOptions() ConnectionOptions
NewConnectionOptions create a new set of connection options.
type MockQueue ¶
type MockQueue struct {
// contains filtered or unexported fields
}
MockQueue is a mock of Queue interface
func NewMockQueue ¶
func NewMockQueue(ctrl *gomock.Controller) *MockQueue
NewMockQueue creates a new mock instance
func (*MockQueue) EXPECT ¶
func (m *MockQueue) EXPECT() *MockQueueMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockQueue) Enqueue ¶
func (m *MockQueue) Enqueue(arg0 *RefCountedBuffer) error
Enqueue mocks base method
type MockQueueMockRecorder ¶
type MockQueueMockRecorder struct {
// contains filtered or unexported fields
}
MockQueueMockRecorder is the mock recorder for MockQueue
func (*MockQueueMockRecorder) Close ¶
func (mr *MockQueueMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close
func (*MockQueueMockRecorder) Enqueue ¶
func (mr *MockQueueMockRecorder) Enqueue(arg0 interface{}) *gomock.Call
Enqueue indicates an expected call of Enqueue
type Queue ¶
type Queue interface { // Enqueue enqueues a ref-counted buffer. Enqueue(buffer *RefCountedBuffer) error // Close closes the queue. Close() }
Queue is a queue for queuing encoded data and sending them to backend servers.
type QueueOptions ¶
type QueueOptions interface { // SetClockOptions sets the clock options. SetClockOptions(value clock.Options) QueueOptions // ClockOptions returns the clock options. ClockOptions() clock.Options // SetInstrumentOptions sets the instrument options. SetInstrumentOptions(value instrument.Options) QueueOptions // InstrumentOptions returns the instrument options. InstrumentOptions() instrument.Options // SetConnectionOptions sets the connection options. SetConnectionOptions(value ConnectionOptions) QueueOptions // ConnectionOptions returns the connection options. ConnectionOptions() ConnectionOptions // SetQueueSize sets the queue size. SetQueueSize(value int) QueueOptions // QueueSize returns the queue size. QueueSize() int }
QueueOptions provide a set of queue options.
func NewQueueOptions ¶
func NewQueueOptions() QueueOptions
NewQueueOptions create a new set of queue options.
type RefCountedBuffer ¶
type RefCountedBuffer struct {
// contains filtered or unexported fields
}
RefCountedBuffer is a refcounted buffer.
func NewRefCountedBuffer ¶
func NewRefCountedBuffer(buffer msgpack.Buffer) *RefCountedBuffer
NewRefCountedBuffer creates a new refcounted buffer.
func (*RefCountedBuffer) Buffer ¶
func (b *RefCountedBuffer) Buffer() msgpack.Buffer
Buffer returns the internal msgpack buffer.
func (*RefCountedBuffer) DecRef ¶
func (b *RefCountedBuffer) DecRef()
DecRef decrements the refcount for the buffer.
func (*RefCountedBuffer) IncRef ¶
func (b *RefCountedBuffer) IncRef()
IncRef increments the refcount for the buffer.