taskmocks

package
v0.0.0-...-5ed4770 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TaskQueue

type TaskQueue struct {
	mock.Mock
}

TaskQueue is an autogenerated mock type for the TaskQueue type

func NewTaskQueue

func NewTaskQueue(t interface {
	mock.TestingT
	Cleanup(func())
}) *TaskQueue

NewTaskQueue creates a new instance of TaskQueue. 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 (*TaskQueue) Close

func (_m *TaskQueue) Close() error

Close provides a mock function with no fields

func (*TaskQueue) Consume

func (_m *TaskQueue) Consume(ctx context.Context, handler func(context.Context, string, []byte) error) error

Consume provides a mock function with given fields: ctx, handler

func (*TaskQueue) EXPECT

func (_m *TaskQueue) EXPECT() *TaskQueue_Expecter

func (*TaskQueue) Enqueue

func (_m *TaskQueue) Enqueue(ctx context.Context, taskType string, payload []byte, opts ...task.EnqueueOption) error

Enqueue provides a mock function with given fields: ctx, taskType, payload, opts

type TaskQueue_Close_Call

type TaskQueue_Close_Call struct {
	*mock.Call
}

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

func (*TaskQueue_Close_Call) Return

func (*TaskQueue_Close_Call) Run

func (_c *TaskQueue_Close_Call) Run(run func()) *TaskQueue_Close_Call

func (*TaskQueue_Close_Call) RunAndReturn

func (_c *TaskQueue_Close_Call) RunAndReturn(run func() error) *TaskQueue_Close_Call

type TaskQueue_Consume_Call

type TaskQueue_Consume_Call struct {
	*mock.Call
}

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

func (*TaskQueue_Consume_Call) Return

func (*TaskQueue_Consume_Call) Run

func (_c *TaskQueue_Consume_Call) Run(run func(ctx context.Context, handler func(context.Context, string, []byte) error)) *TaskQueue_Consume_Call

func (*TaskQueue_Consume_Call) RunAndReturn

type TaskQueue_Enqueue_Call

type TaskQueue_Enqueue_Call struct {
	*mock.Call
}

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

func (*TaskQueue_Enqueue_Call) Return

func (*TaskQueue_Enqueue_Call) Run

func (_c *TaskQueue_Enqueue_Call) Run(run func(ctx context.Context, taskType string, payload []byte, opts ...task.EnqueueOption)) *TaskQueue_Enqueue_Call

func (*TaskQueue_Enqueue_Call) RunAndReturn

type TaskQueue_Expecter

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

func (*TaskQueue_Expecter) Close

Close is a helper method to define mock.On call

func (*TaskQueue_Expecter) Consume

func (_e *TaskQueue_Expecter) Consume(ctx interface{}, handler interface{}) *TaskQueue_Consume_Call

Consume is a helper method to define mock.On call

  • ctx context.Context
  • handler func(context.Context , string , []byte) error

func (*TaskQueue_Expecter) Enqueue

func (_e *TaskQueue_Expecter) Enqueue(ctx interface{}, taskType interface{}, payload interface{}, opts ...interface{}) *TaskQueue_Enqueue_Call

Enqueue is a helper method to define mock.On call

  • ctx context.Context
  • taskType string
  • payload []byte
  • opts ...task.EnqueueOption

Jump to

Keyboard shortcuts

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