mockredis

package
v0.12.4 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	mock.Mock
}

Client is an autogenerated mock type for the Client type

func NewClient

func NewClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *Client

NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Client) DeleteQueue

func (_mock *Client) DeleteQueue(ctx context.Context, queueName string) error

DeleteQueue provides a mock function for the type Client

func (*Client) DeleteRingBuffer

func (_mock *Client) DeleteRingBuffer(ctx context.Context, bufferName string) error

DeleteRingBuffer provides a mock function for the type Client

func (*Client) EXPECT

func (_m *Client) EXPECT() *Client_Expecter

func (*Client) GetQueueHandle

func (_mock *Client) GetQueueHandle(ctx context.Context, queueName string) (redis.Queue, error)

GetQueueHandle provides a mock function for the type Client

func (*Client) GetRingBuffer

func (_mock *Client) GetRingBuffer(ctx context.Context, bufferName string, capacity int64) (redis.RingBuffer, error)

GetRingBuffer provides a mock function for the type Client

func (*Client) Publish added in v0.12.1

func (_mock *Client) Publish(ctx context.Context, msg redis.PubSubMessage) error

Publish provides a mock function for the type Client

func (*Client) Subscribe added in v0.12.1

func (_mock *Client) Subscribe(ctx context.Context, subName string, topics []string) (redis.Subscriber, error)

Subscribe provides a mock function for the type Client

type Client_DeleteQueue_Call

type Client_DeleteQueue_Call struct {
	*mock.Call
}

Client_DeleteQueue_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteQueue'

func (*Client_DeleteQueue_Call) Return

func (*Client_DeleteQueue_Call) Run

func (_c *Client_DeleteQueue_Call) Run(run func(ctx context.Context, queueName string)) *Client_DeleteQueue_Call

func (*Client_DeleteQueue_Call) RunAndReturn

func (_c *Client_DeleteQueue_Call) RunAndReturn(run func(ctx context.Context, queueName string) error) *Client_DeleteQueue_Call

type Client_DeleteRingBuffer_Call

type Client_DeleteRingBuffer_Call struct {
	*mock.Call
}

Client_DeleteRingBuffer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteRingBuffer'

func (*Client_DeleteRingBuffer_Call) Return

func (*Client_DeleteRingBuffer_Call) Run

func (*Client_DeleteRingBuffer_Call) RunAndReturn

func (_c *Client_DeleteRingBuffer_Call) RunAndReturn(run func(ctx context.Context, bufferName string) error) *Client_DeleteRingBuffer_Call

type Client_Expecter

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

func (*Client_Expecter) DeleteQueue

func (_e *Client_Expecter) DeleteQueue(ctx interface{}, queueName interface{}) *Client_DeleteQueue_Call

DeleteQueue is a helper method to define mock.On call

  • ctx context.Context
  • queueName string

func (*Client_Expecter) DeleteRingBuffer

func (_e *Client_Expecter) DeleteRingBuffer(ctx interface{}, bufferName interface{}) *Client_DeleteRingBuffer_Call

DeleteRingBuffer is a helper method to define mock.On call

  • ctx context.Context
  • bufferName string

func (*Client_Expecter) GetQueueHandle

func (_e *Client_Expecter) GetQueueHandle(ctx interface{}, queueName interface{}) *Client_GetQueueHandle_Call

GetQueueHandle is a helper method to define mock.On call

  • ctx context.Context
  • queueName string

func (*Client_Expecter) GetRingBuffer

func (_e *Client_Expecter) GetRingBuffer(ctx interface{}, bufferName interface{}, capacity interface{}) *Client_GetRingBuffer_Call

GetRingBuffer is a helper method to define mock.On call

  • ctx context.Context
  • bufferName string
  • capacity int64

func (*Client_Expecter) Publish added in v0.12.1

func (_e *Client_Expecter) Publish(ctx interface{}, msg interface{}) *Client_Publish_Call

Publish is a helper method to define mock.On call

  • ctx context.Context
  • msg redis.PubSubMessage

func (*Client_Expecter) Subscribe added in v0.12.1

func (_e *Client_Expecter) Subscribe(ctx interface{}, subName interface{}, topics interface{}) *Client_Subscribe_Call

Subscribe is a helper method to define mock.On call

  • ctx context.Context
  • subName string
  • topics []string

type Client_GetQueueHandle_Call

type Client_GetQueueHandle_Call struct {
	*mock.Call
}

Client_GetQueueHandle_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetQueueHandle'

func (*Client_GetQueueHandle_Call) Return

func (*Client_GetQueueHandle_Call) Run

func (_c *Client_GetQueueHandle_Call) Run(run func(ctx context.Context, queueName string)) *Client_GetQueueHandle_Call

func (*Client_GetQueueHandle_Call) RunAndReturn

func (_c *Client_GetQueueHandle_Call) RunAndReturn(run func(ctx context.Context, queueName string) (redis.Queue, error)) *Client_GetQueueHandle_Call

type Client_GetRingBuffer_Call

type Client_GetRingBuffer_Call struct {
	*mock.Call
}

Client_GetRingBuffer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRingBuffer'

func (*Client_GetRingBuffer_Call) Return

func (*Client_GetRingBuffer_Call) Run

func (_c *Client_GetRingBuffer_Call) Run(run func(ctx context.Context, bufferName string, capacity int64)) *Client_GetRingBuffer_Call

func (*Client_GetRingBuffer_Call) RunAndReturn

func (_c *Client_GetRingBuffer_Call) RunAndReturn(run func(ctx context.Context, bufferName string, capacity int64) (redis.RingBuffer, error)) *Client_GetRingBuffer_Call

type Client_Publish_Call added in v0.12.1

type Client_Publish_Call struct {
	*mock.Call
}

Client_Publish_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Publish'

func (*Client_Publish_Call) Return added in v0.12.1

func (*Client_Publish_Call) Run added in v0.12.1

func (*Client_Publish_Call) RunAndReturn added in v0.12.1

func (_c *Client_Publish_Call) RunAndReturn(run func(ctx context.Context, msg redis.PubSubMessage) error) *Client_Publish_Call

type Client_Subscribe_Call added in v0.12.1

type Client_Subscribe_Call struct {
	*mock.Call
}

Client_Subscribe_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Subscribe'

func (*Client_Subscribe_Call) Return added in v0.12.1

func (_c *Client_Subscribe_Call) Return(subscriber redis.Subscriber, err error) *Client_Subscribe_Call

func (*Client_Subscribe_Call) Run added in v0.12.1

func (_c *Client_Subscribe_Call) Run(run func(ctx context.Context, subName string, topics []string)) *Client_Subscribe_Call

func (*Client_Subscribe_Call) RunAndReturn added in v0.12.1

func (_c *Client_Subscribe_Call) RunAndReturn(run func(ctx context.Context, subName string, topics []string) (redis.Subscriber, error)) *Client_Subscribe_Call

type Queue

type Queue struct {
	mock.Mock
}

Queue is an autogenerated mock type for the Queue type

func NewQueue

func NewQueue(t interface {
	mock.TestingT
	Cleanup(func())
}) *Queue

NewQueue creates a new instance of Queue. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Queue) EXPECT

func (_m *Queue) EXPECT() *Queue_Expecter

func (*Queue) Length

func (_mock *Queue) Length(ctx context.Context) (uint64, error)

Length provides a mock function for the type Queue

func (*Queue) PeakLeft

func (_mock *Queue) PeakLeft(ctx context.Context) (redis.QueueMessageEnvelope, error)

PeakLeft provides a mock function for the type Queue

func (*Queue) PeakRight

func (_mock *Queue) PeakRight(ctx context.Context) (redis.QueueMessageEnvelope, error)

PeakRight provides a mock function for the type Queue

func (*Queue) PopLeft

func (_mock *Queue) PopLeft(ctx context.Context, blocking bool, maxWait *time.Duration) (redis.QueueMessageEnvelope, error)

PopLeft provides a mock function for the type Queue

func (*Queue) PopLeftAndMove

func (_mock *Queue) PopLeftAndMove(ctx context.Context, destination string, insertOnLeft bool, blocking bool, maxWait *time.Duration) (redis.QueueMessageEnvelope, error)

PopLeftAndMove provides a mock function for the type Queue

func (*Queue) PopRight

func (_mock *Queue) PopRight(ctx context.Context, blocking bool, maxWait *time.Duration) (redis.QueueMessageEnvelope, error)

PopRight provides a mock function for the type Queue

func (*Queue) PopRightAndMove

func (_mock *Queue) PopRightAndMove(ctx context.Context, destination string, insertOnLeft bool, blocking bool, maxWait *time.Duration) (redis.QueueMessageEnvelope, error)

PopRightAndMove provides a mock function for the type Queue

func (*Queue) PushLeft

func (_mock *Queue) PushLeft(ctx context.Context, message redis.QueueMessageEnvelope, ttl *time.Duration) (uint64, error)

PushLeft provides a mock function for the type Queue

func (*Queue) PushRight

func (_mock *Queue) PushRight(ctx context.Context, message redis.QueueMessageEnvelope, ttl *time.Duration) (uint64, error)

PushRight provides a mock function for the type Queue

func (*Queue) QueueName

func (_mock *Queue) QueueName() string

QueueName provides a mock function for the type Queue

func (*Queue) Remove

func (_mock *Queue) Remove(ctx context.Context, message redis.QueueMessageEnvelope) error

Remove provides a mock function for the type Queue

func (*Queue) RemoveAndMove added in v0.12.1

func (_mock *Queue) RemoveAndMove(ctx context.Context, destination string, message redis.QueueMessageEnvelope, insertOnLeft bool) error

RemoveAndMove provides a mock function for the type Queue

type QueueMessageEnvelope

type QueueMessageEnvelope struct {
	mock.Mock
}

QueueMessageEnvelope is an autogenerated mock type for the QueueMessageEnvelope type

func NewQueueMessageEnvelope

func NewQueueMessageEnvelope(t interface {
	mock.TestingT
	Cleanup(func())
}) *QueueMessageEnvelope

NewQueueMessageEnvelope creates a new instance of QueueMessageEnvelope. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*QueueMessageEnvelope) EXPECT

func (*QueueMessageEnvelope) StringPayload

func (_mock *QueueMessageEnvelope) StringPayload() (string, error)

StringPayload provides a mock function for the type QueueMessageEnvelope

type QueueMessageEnvelope_Expecter

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

func (*QueueMessageEnvelope_Expecter) StringPayload

StringPayload is a helper method to define mock.On call

type QueueMessageEnvelope_StringPayload_Call

type QueueMessageEnvelope_StringPayload_Call struct {
	*mock.Call
}

QueueMessageEnvelope_StringPayload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StringPayload'

func (*QueueMessageEnvelope_StringPayload_Call) Return

func (*QueueMessageEnvelope_StringPayload_Call) Run

func (*QueueMessageEnvelope_StringPayload_Call) RunAndReturn

type Queue_Expecter

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

func (*Queue_Expecter) Length

func (_e *Queue_Expecter) Length(ctx interface{}) *Queue_Length_Call

Length is a helper method to define mock.On call

  • ctx context.Context

func (*Queue_Expecter) PeakLeft

func (_e *Queue_Expecter) PeakLeft(ctx interface{}) *Queue_PeakLeft_Call

PeakLeft is a helper method to define mock.On call

  • ctx context.Context

func (*Queue_Expecter) PeakRight

func (_e *Queue_Expecter) PeakRight(ctx interface{}) *Queue_PeakRight_Call

PeakRight is a helper method to define mock.On call

  • ctx context.Context

func (*Queue_Expecter) PopLeft

func (_e *Queue_Expecter) PopLeft(ctx interface{}, blocking interface{}, maxWait interface{}) *Queue_PopLeft_Call

PopLeft is a helper method to define mock.On call

  • ctx context.Context
  • blocking bool
  • maxWait *time.Duration

func (*Queue_Expecter) PopLeftAndMove

func (_e *Queue_Expecter) PopLeftAndMove(ctx interface{}, destination interface{}, insertOnLeft interface{}, blocking interface{}, maxWait interface{}) *Queue_PopLeftAndMove_Call

PopLeftAndMove is a helper method to define mock.On call

  • ctx context.Context
  • destination string
  • insertOnLeft bool
  • blocking bool
  • maxWait *time.Duration

func (*Queue_Expecter) PopRight

func (_e *Queue_Expecter) PopRight(ctx interface{}, blocking interface{}, maxWait interface{}) *Queue_PopRight_Call

PopRight is a helper method to define mock.On call

  • ctx context.Context
  • blocking bool
  • maxWait *time.Duration

func (*Queue_Expecter) PopRightAndMove

func (_e *Queue_Expecter) PopRightAndMove(ctx interface{}, destination interface{}, insertOnLeft interface{}, blocking interface{}, maxWait interface{}) *Queue_PopRightAndMove_Call

PopRightAndMove is a helper method to define mock.On call

  • ctx context.Context
  • destination string
  • insertOnLeft bool
  • blocking bool
  • maxWait *time.Duration

func (*Queue_Expecter) PushLeft

func (_e *Queue_Expecter) PushLeft(ctx interface{}, message interface{}, ttl interface{}) *Queue_PushLeft_Call

PushLeft is a helper method to define mock.On call

  • ctx context.Context
  • message redis.QueueMessageEnvelope
  • ttl *time.Duration

func (*Queue_Expecter) PushRight

func (_e *Queue_Expecter) PushRight(ctx interface{}, message interface{}, ttl interface{}) *Queue_PushRight_Call

PushRight is a helper method to define mock.On call

  • ctx context.Context
  • message redis.QueueMessageEnvelope
  • ttl *time.Duration

func (*Queue_Expecter) QueueName

func (_e *Queue_Expecter) QueueName() *Queue_QueueName_Call

QueueName is a helper method to define mock.On call

func (*Queue_Expecter) Remove

func (_e *Queue_Expecter) Remove(ctx interface{}, message interface{}) *Queue_Remove_Call

Remove is a helper method to define mock.On call

  • ctx context.Context
  • message redis.QueueMessageEnvelope

func (*Queue_Expecter) RemoveAndMove added in v0.12.1

func (_e *Queue_Expecter) RemoveAndMove(ctx interface{}, destination interface{}, message interface{}, insertOnLeft interface{}) *Queue_RemoveAndMove_Call

RemoveAndMove is a helper method to define mock.On call

  • ctx context.Context
  • destination string
  • message redis.QueueMessageEnvelope
  • insertOnLeft bool

type Queue_Length_Call

type Queue_Length_Call struct {
	*mock.Call
}

Queue_Length_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Length'

func (*Queue_Length_Call) Return

func (_c *Queue_Length_Call) Return(v uint64, err error) *Queue_Length_Call

func (*Queue_Length_Call) Run

func (_c *Queue_Length_Call) Run(run func(ctx context.Context)) *Queue_Length_Call

func (*Queue_Length_Call) RunAndReturn

func (_c *Queue_Length_Call) RunAndReturn(run func(ctx context.Context) (uint64, error)) *Queue_Length_Call

type Queue_PeakLeft_Call

type Queue_PeakLeft_Call struct {
	*mock.Call
}

Queue_PeakLeft_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PeakLeft'

func (*Queue_PeakLeft_Call) Return

func (_c *Queue_PeakLeft_Call) Return(queueMessageEnvelope redis.QueueMessageEnvelope, err error) *Queue_PeakLeft_Call

func (*Queue_PeakLeft_Call) Run

func (_c *Queue_PeakLeft_Call) Run(run func(ctx context.Context)) *Queue_PeakLeft_Call

func (*Queue_PeakLeft_Call) RunAndReturn

type Queue_PeakRight_Call

type Queue_PeakRight_Call struct {
	*mock.Call
}

Queue_PeakRight_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PeakRight'

func (*Queue_PeakRight_Call) Return

func (_c *Queue_PeakRight_Call) Return(queueMessageEnvelope redis.QueueMessageEnvelope, err error) *Queue_PeakRight_Call

func (*Queue_PeakRight_Call) Run

func (_c *Queue_PeakRight_Call) Run(run func(ctx context.Context)) *Queue_PeakRight_Call

func (*Queue_PeakRight_Call) RunAndReturn

type Queue_PopLeftAndMove_Call

type Queue_PopLeftAndMove_Call struct {
	*mock.Call
}

Queue_PopLeftAndMove_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PopLeftAndMove'

func (*Queue_PopLeftAndMove_Call) Return

func (*Queue_PopLeftAndMove_Call) Run

func (_c *Queue_PopLeftAndMove_Call) Run(run func(ctx context.Context, destination string, insertOnLeft bool, blocking bool, maxWait *time.Duration)) *Queue_PopLeftAndMove_Call

func (*Queue_PopLeftAndMove_Call) RunAndReturn

func (_c *Queue_PopLeftAndMove_Call) RunAndReturn(run func(ctx context.Context, destination string, insertOnLeft bool, blocking bool, maxWait *time.Duration) (redis.QueueMessageEnvelope, error)) *Queue_PopLeftAndMove_Call

type Queue_PopLeft_Call

type Queue_PopLeft_Call struct {
	*mock.Call
}

Queue_PopLeft_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PopLeft'

func (*Queue_PopLeft_Call) Return

func (_c *Queue_PopLeft_Call) Return(queueMessageEnvelope redis.QueueMessageEnvelope, err error) *Queue_PopLeft_Call

func (*Queue_PopLeft_Call) Run

func (_c *Queue_PopLeft_Call) Run(run func(ctx context.Context, blocking bool, maxWait *time.Duration)) *Queue_PopLeft_Call

func (*Queue_PopLeft_Call) RunAndReturn

func (_c *Queue_PopLeft_Call) RunAndReturn(run func(ctx context.Context, blocking bool, maxWait *time.Duration) (redis.QueueMessageEnvelope, error)) *Queue_PopLeft_Call

type Queue_PopRightAndMove_Call

type Queue_PopRightAndMove_Call struct {
	*mock.Call
}

Queue_PopRightAndMove_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PopRightAndMove'

func (*Queue_PopRightAndMove_Call) Return

func (*Queue_PopRightAndMove_Call) Run

func (_c *Queue_PopRightAndMove_Call) Run(run func(ctx context.Context, destination string, insertOnLeft bool, blocking bool, maxWait *time.Duration)) *Queue_PopRightAndMove_Call

func (*Queue_PopRightAndMove_Call) RunAndReturn

func (_c *Queue_PopRightAndMove_Call) RunAndReturn(run func(ctx context.Context, destination string, insertOnLeft bool, blocking bool, maxWait *time.Duration) (redis.QueueMessageEnvelope, error)) *Queue_PopRightAndMove_Call

type Queue_PopRight_Call

type Queue_PopRight_Call struct {
	*mock.Call
}

Queue_PopRight_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PopRight'

func (*Queue_PopRight_Call) Return

func (_c *Queue_PopRight_Call) Return(queueMessageEnvelope redis.QueueMessageEnvelope, err error) *Queue_PopRight_Call

func (*Queue_PopRight_Call) Run

func (_c *Queue_PopRight_Call) Run(run func(ctx context.Context, blocking bool, maxWait *time.Duration)) *Queue_PopRight_Call

func (*Queue_PopRight_Call) RunAndReturn

func (_c *Queue_PopRight_Call) RunAndReturn(run func(ctx context.Context, blocking bool, maxWait *time.Duration) (redis.QueueMessageEnvelope, error)) *Queue_PopRight_Call

type Queue_PushLeft_Call

type Queue_PushLeft_Call struct {
	*mock.Call
}

Queue_PushLeft_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PushLeft'

func (*Queue_PushLeft_Call) Return

func (*Queue_PushLeft_Call) Run

func (*Queue_PushLeft_Call) RunAndReturn

func (_c *Queue_PushLeft_Call) RunAndReturn(run func(ctx context.Context, message redis.QueueMessageEnvelope, ttl *time.Duration) (uint64, error)) *Queue_PushLeft_Call

type Queue_PushRight_Call

type Queue_PushRight_Call struct {
	*mock.Call
}

Queue_PushRight_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PushRight'

func (*Queue_PushRight_Call) Return

func (*Queue_PushRight_Call) Run

func (*Queue_PushRight_Call) RunAndReturn

func (_c *Queue_PushRight_Call) RunAndReturn(run func(ctx context.Context, message redis.QueueMessageEnvelope, ttl *time.Duration) (uint64, error)) *Queue_PushRight_Call

type Queue_QueueName_Call

type Queue_QueueName_Call struct {
	*mock.Call
}

Queue_QueueName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueueName'

func (*Queue_QueueName_Call) Return

func (*Queue_QueueName_Call) Run

func (_c *Queue_QueueName_Call) Run(run func()) *Queue_QueueName_Call

func (*Queue_QueueName_Call) RunAndReturn

func (_c *Queue_QueueName_Call) RunAndReturn(run func() string) *Queue_QueueName_Call

type Queue_RemoveAndMove_Call added in v0.12.1

type Queue_RemoveAndMove_Call struct {
	*mock.Call
}

Queue_RemoveAndMove_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveAndMove'

func (*Queue_RemoveAndMove_Call) Return added in v0.12.1

func (*Queue_RemoveAndMove_Call) Run added in v0.12.1

func (_c *Queue_RemoveAndMove_Call) Run(run func(ctx context.Context, destination string, message redis.QueueMessageEnvelope, insertOnLeft bool)) *Queue_RemoveAndMove_Call

func (*Queue_RemoveAndMove_Call) RunAndReturn added in v0.12.1

func (_c *Queue_RemoveAndMove_Call) RunAndReturn(run func(ctx context.Context, destination string, message redis.QueueMessageEnvelope, insertOnLeft bool) error) *Queue_RemoveAndMove_Call

type Queue_Remove_Call

type Queue_Remove_Call struct {
	*mock.Call
}

Queue_Remove_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Remove'

func (*Queue_Remove_Call) Return

func (_c *Queue_Remove_Call) Return(err error) *Queue_Remove_Call

func (*Queue_Remove_Call) Run

func (*Queue_Remove_Call) RunAndReturn

func (_c *Queue_Remove_Call) RunAndReturn(run func(ctx context.Context, message redis.QueueMessageEnvelope) error) *Queue_Remove_Call

type RingBuffer

type RingBuffer struct {
	mock.Mock
}

RingBuffer is an autogenerated mock type for the RingBuffer type

func NewRingBuffer

func NewRingBuffer(t interface {
	mock.TestingT
	Cleanup(func())
}) *RingBuffer

NewRingBuffer creates a new instance of RingBuffer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*RingBuffer) AsReadWriteCloser

func (_mock *RingBuffer) AsReadWriteCloser(parentCtx context.Context, initReadOffset int64, dataCheckInt time.Duration) io.ReadWriteCloser

AsReadWriteCloser provides a mock function for the type RingBuffer

func (*RingBuffer) EXPECT

func (_m *RingBuffer) EXPECT() *RingBuffer_Expecter

func (*RingBuffer) ReadAt

func (_mock *RingBuffer) ReadAt(ctx context.Context, buf []byte, offset int64) (int64, int, int64, error)

ReadAt provides a mock function for the type RingBuffer

func (*RingBuffer) ReadNewest

func (_mock *RingBuffer) ReadNewest(ctx context.Context, buf []byte) (int64, int, int64, error)

ReadNewest provides a mock function for the type RingBuffer

func (*RingBuffer) Total

func (_mock *RingBuffer) Total(ctx context.Context) (int64, error)

Total provides a mock function for the type RingBuffer

func (*RingBuffer) Write

func (_mock *RingBuffer) Write(ctx context.Context, data []byte) (int64, error)

Write provides a mock function for the type RingBuffer

type RingBuffer_AsReadWriteCloser_Call

type RingBuffer_AsReadWriteCloser_Call struct {
	*mock.Call
}

RingBuffer_AsReadWriteCloser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AsReadWriteCloser'

func (*RingBuffer_AsReadWriteCloser_Call) Return

func (*RingBuffer_AsReadWriteCloser_Call) Run

func (_c *RingBuffer_AsReadWriteCloser_Call) Run(run func(parentCtx context.Context, initReadOffset int64, dataCheckInt time.Duration)) *RingBuffer_AsReadWriteCloser_Call

func (*RingBuffer_AsReadWriteCloser_Call) RunAndReturn

func (_c *RingBuffer_AsReadWriteCloser_Call) RunAndReturn(run func(parentCtx context.Context, initReadOffset int64, dataCheckInt time.Duration) io.ReadWriteCloser) *RingBuffer_AsReadWriteCloser_Call

type RingBuffer_Expecter

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

func (*RingBuffer_Expecter) AsReadWriteCloser

func (_e *RingBuffer_Expecter) AsReadWriteCloser(parentCtx interface{}, initReadOffset interface{}, dataCheckInt interface{}) *RingBuffer_AsReadWriteCloser_Call

AsReadWriteCloser is a helper method to define mock.On call

  • parentCtx context.Context
  • initReadOffset int64
  • dataCheckInt time.Duration

func (*RingBuffer_Expecter) ReadAt

func (_e *RingBuffer_Expecter) ReadAt(ctx interface{}, buf interface{}, offset interface{}) *RingBuffer_ReadAt_Call

ReadAt is a helper method to define mock.On call

  • ctx context.Context
  • buf []byte
  • offset int64

func (*RingBuffer_Expecter) ReadNewest

func (_e *RingBuffer_Expecter) ReadNewest(ctx interface{}, buf interface{}) *RingBuffer_ReadNewest_Call

ReadNewest is a helper method to define mock.On call

  • ctx context.Context
  • buf []byte

func (*RingBuffer_Expecter) Total

func (_e *RingBuffer_Expecter) Total(ctx interface{}) *RingBuffer_Total_Call

Total is a helper method to define mock.On call

  • ctx context.Context

func (*RingBuffer_Expecter) Write

func (_e *RingBuffer_Expecter) Write(ctx interface{}, data interface{}) *RingBuffer_Write_Call

Write is a helper method to define mock.On call

  • ctx context.Context
  • data []byte

type RingBuffer_ReadAt_Call

type RingBuffer_ReadAt_Call struct {
	*mock.Call
}

RingBuffer_ReadAt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadAt'

func (*RingBuffer_ReadAt_Call) Return

func (_c *RingBuffer_ReadAt_Call) Return(n int64, n1 int, n2 int64, err error) *RingBuffer_ReadAt_Call

func (*RingBuffer_ReadAt_Call) Run

func (_c *RingBuffer_ReadAt_Call) Run(run func(ctx context.Context, buf []byte, offset int64)) *RingBuffer_ReadAt_Call

func (*RingBuffer_ReadAt_Call) RunAndReturn

func (_c *RingBuffer_ReadAt_Call) RunAndReturn(run func(ctx context.Context, buf []byte, offset int64) (int64, int, int64, error)) *RingBuffer_ReadAt_Call

type RingBuffer_ReadNewest_Call

type RingBuffer_ReadNewest_Call struct {
	*mock.Call
}

RingBuffer_ReadNewest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadNewest'

func (*RingBuffer_ReadNewest_Call) Return

func (*RingBuffer_ReadNewest_Call) Run

func (*RingBuffer_ReadNewest_Call) RunAndReturn

func (_c *RingBuffer_ReadNewest_Call) RunAndReturn(run func(ctx context.Context, buf []byte) (int64, int, int64, error)) *RingBuffer_ReadNewest_Call

type RingBuffer_Total_Call

type RingBuffer_Total_Call struct {
	*mock.Call
}

RingBuffer_Total_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Total'

func (*RingBuffer_Total_Call) Return

func (*RingBuffer_Total_Call) Run

func (*RingBuffer_Total_Call) RunAndReturn

func (_c *RingBuffer_Total_Call) RunAndReturn(run func(ctx context.Context) (int64, error)) *RingBuffer_Total_Call

type RingBuffer_Write_Call

type RingBuffer_Write_Call struct {
	*mock.Call
}

RingBuffer_Write_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Write'

func (*RingBuffer_Write_Call) Return

func (*RingBuffer_Write_Call) Run

func (_c *RingBuffer_Write_Call) Run(run func(ctx context.Context, data []byte)) *RingBuffer_Write_Call

func (*RingBuffer_Write_Call) RunAndReturn

func (_c *RingBuffer_Write_Call) RunAndReturn(run func(ctx context.Context, data []byte) (int64, error)) *RingBuffer_Write_Call

type Subscriber added in v0.12.1

type Subscriber struct {
	mock.Mock
}

Subscriber is an autogenerated mock type for the Subscriber type

func NewSubscriber added in v0.12.1

func NewSubscriber(t interface {
	mock.TestingT
	Cleanup(func())
}) *Subscriber

NewSubscriber creates a new instance of Subscriber. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Subscriber) EXPECT added in v0.12.1

func (_m *Subscriber) EXPECT() *Subscriber_Expecter

func (*Subscriber) Start added in v0.12.1

func (_mock *Subscriber) Start(parentCtx context.Context, handler redis.PubSubMessageHandler) error

Start provides a mock function for the type Subscriber

func (*Subscriber) Stop added in v0.12.1

func (_mock *Subscriber) Stop(ctx context.Context) error

Stop provides a mock function for the type Subscriber

type Subscriber_Expecter added in v0.12.1

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

func (*Subscriber_Expecter) Start added in v0.12.1

func (_e *Subscriber_Expecter) Start(parentCtx interface{}, handler interface{}) *Subscriber_Start_Call

Start is a helper method to define mock.On call

  • parentCtx context.Context
  • handler redis.PubSubMessageHandler

func (*Subscriber_Expecter) Stop added in v0.12.1

func (_e *Subscriber_Expecter) Stop(ctx interface{}) *Subscriber_Stop_Call

Stop is a helper method to define mock.On call

  • ctx context.Context

type Subscriber_Start_Call added in v0.12.1

type Subscriber_Start_Call struct {
	*mock.Call
}

Subscriber_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start'

func (*Subscriber_Start_Call) Return added in v0.12.1

func (*Subscriber_Start_Call) Run added in v0.12.1

func (*Subscriber_Start_Call) RunAndReturn added in v0.12.1

func (_c *Subscriber_Start_Call) RunAndReturn(run func(parentCtx context.Context, handler redis.PubSubMessageHandler) error) *Subscriber_Start_Call

type Subscriber_Stop_Call added in v0.12.1

type Subscriber_Stop_Call struct {
	*mock.Call
}

Subscriber_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop'

func (*Subscriber_Stop_Call) Return added in v0.12.1

func (*Subscriber_Stop_Call) Run added in v0.12.1

func (_c *Subscriber_Stop_Call) Run(run func(ctx context.Context)) *Subscriber_Stop_Call

func (*Subscriber_Stop_Call) RunAndReturn added in v0.12.1

func (_c *Subscriber_Stop_Call) RunAndReturn(run func(ctx context.Context) error) *Subscriber_Stop_Call

Jump to

Keyboard shortcuts

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