mocks

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

type Executor struct {
	mock.Mock
}

Executor is an autogenerated mock type for the Executor type

func NewExecutor

func NewExecutor(t interface {
	mock.TestingT
	Cleanup(func())
}) *Executor

NewExecutor creates a new instance of Executor. 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 (*Executor) NewFixedWorkerPool

func (_m *Executor) NewFixedWorkerPool(ctx context.Context, options *commons.Options) asyncgo.WorkerPool

NewFixedWorkerPool provides a mock function with given fields: ctx, options

func (*Executor) Submit

func (_m *Executor) Submit(function interface{}, args ...interface{}) *asyncgo.Future

Submit provides a mock function with given fields: function, args

type ExecutorService

type ExecutorService struct {
	mock.Mock
}

ExecutorService is an autogenerated mock type for the ExecutorService type

func NewExecutorService

func NewExecutorService(t interface {
	mock.TestingT
	Cleanup(func())
}) *ExecutorService

NewExecutorService creates a new instance of ExecutorService. 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 (*ExecutorService) NewFixedWorkerPool

func (_m *ExecutorService) NewFixedWorkerPool(options *commons.Options) asyncgo.WorkerPool

NewFixedWorkerPool provides a mock function with given fields: options

func (*ExecutorService) Submit

func (_m *ExecutorService) Submit(function interface{}, args ...interface{}) (*asyncgo.Future, error)

Submit provides a mock function with given fields: function, args

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

func (_m *Queue) Pop() *internal.Task

Pop provides a mock function with given fields:

func (*Queue) Process

func (_m *Queue) Process(wg *sync.WaitGroup, options *commons.Options)

Process provides a mock function with given fields: wg, options

func (*Queue) Push

func (_m *Queue) Push(task *internal.Task) error

Push provides a mock function with given fields: task

type Task

type Task struct {
	mock.Mock
}

Task is an autogenerated mock type for the Task type

func NewTask

func NewTask(t interface {
	mock.TestingT
	Cleanup(func())
}) *Task

NewTask creates a new instance of Task. 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 (*Task) Execute

func (_m *Task) Execute() error

Execute provides a mock function with given fields:

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

func (_m *TaskQueue) Pop() *internal.Task

Pop provides a mock function with given fields:

func (*TaskQueue) Process

func (_m *TaskQueue) Process(wg *sync.WaitGroup, options *commons.Options)

Process provides a mock function with given fields: wg, options

func (*TaskQueue) Push

func (_m *TaskQueue) Push(task *internal.Task) error

Push provides a mock function with given fields: task

type Worker

type Worker struct {
	mock.Mock
}

Worker is an autogenerated mock type for the Worker type

func NewWorker

func NewWorker(t interface {
	mock.TestingT
	Cleanup(func())
}) *Worker

NewWorker creates a new instance of Worker. 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.

type WorkerPool

type WorkerPool struct {
	mock.Mock
}

WorkerPool is an autogenerated mock type for the WorkerPool type

func NewWorkerPool

func NewWorkerPool(t interface {
	mock.TestingT
	Cleanup(func())
}) *WorkerPool

NewWorkerPool creates a new instance of WorkerPool. 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 (*WorkerPool) ChannelBufferSize

func (_m *WorkerPool) ChannelBufferSize() int64

ChannelBufferSize provides a mock function with given fields:

func (*WorkerPool) PoolSize

func (_m *WorkerPool) PoolSize() int64

PoolSize provides a mock function with given fields:

func (*WorkerPool) Shutdown

func (_m *WorkerPool) Shutdown()

Shutdown provides a mock function with given fields:

func (*WorkerPool) Submit

func (_m *WorkerPool) Submit(function interface{}, args ...interface{}) (*asyncgo.Future, error)

Submit provides a mock function with given fields: function, args

func (*WorkerPool) Terminate

func (_m *WorkerPool) Terminate()

Terminate provides a mock function with given fields:

func (*WorkerPool) WaitAll

func (_m *WorkerPool) WaitAll() error

WaitAll provides a mock function with given fields:

Jump to

Keyboard shortcuts

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