mocks

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2022 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 FnWorker

type FnWorker struct {
	mock.Mock
}

FnWorker is an autogenerated mock type for the FnWorker type

func NewFnWorker

func NewFnWorker(t NewFnWorkerT) *FnWorker

NewFnWorker creates a new instance of FnWorker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*FnWorker) IsRunning

func (_m *FnWorker) IsRunning() bool

IsRunning provides a mock function with given fields:

func (*FnWorker) Start

func (_m *FnWorker) Start(ctx context.Context)

Start provides a mock function with given fields: ctx

func (*FnWorker) Stop

func (_m *FnWorker) Stop()

Stop provides a mock function with given fields:

type FnWorkerPool

type FnWorkerPool struct {
	mock.Mock
}

FnWorkerPool is an autogenerated mock type for the FnWorkerPool type

func NewFnWorkerPool

func NewFnWorkerPool(t NewFnWorkerPoolT) *FnWorkerPool

NewFnWorkerPool creates a new instance of FnWorkerPool. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*FnWorkerPool) AddTask

func (_m *FnWorkerPool) AddTask(task worker.TaskFunc)

AddTask provides a mock function with given fields: task

func (*FnWorkerPool) AddWorkers

func (_m *FnWorkerPool) AddWorkers(count int)

AddWorkers provides a mock function with given fields: count

func (*FnWorkerPool) RemoveWorkers

func (_m *FnWorkerPool) RemoveWorkers(count int)

RemoveWorkers provides a mock function with given fields: count

func (*FnWorkerPool) Stop

func (_m *FnWorkerPool) Stop()

Stop provides a mock function with given fields:

func (*FnWorkerPool) TaskChannel

func (_m *FnWorkerPool) TaskChannel() chan worker.TaskFunc

TaskChannel provides a mock function with given fields:

func (*FnWorkerPool) WorkersCount

func (_m *FnWorkerPool) WorkersCount() int

WorkersCount provides a mock function with given fields:

type NewFnWorkerPoolT

type NewFnWorkerPoolT interface {
	mock.TestingT
	Cleanup(func())
}

type NewFnWorkerT

type NewFnWorkerT interface {
	mock.TestingT
	Cleanup(func())
}

type NewTaskT

type NewTaskT interface {
	mock.TestingT
	Cleanup(func())
}

type NewWorkerPoolT

type NewWorkerPoolT interface {
	mock.TestingT
	Cleanup(func())
}

type NewWorkerT

type NewWorkerT interface {
	mock.TestingT
	Cleanup(func())
}

type Task

type Task struct {
	mock.Mock
}

Task is an autogenerated mock type for the Task type

func NewTask

func NewTask(t NewTaskT) *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.

func (*Task) Run

func (_m *Task) Run(ctx context.Context)

Run provides a mock function with given fields: ctx

type Worker

type Worker struct {
	mock.Mock
}

Worker is an autogenerated mock type for the Worker type

func NewWorker

func NewWorker(t NewWorkerT) *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.

func (*Worker) IsRunning

func (_m *Worker) IsRunning() bool

IsRunning provides a mock function with given fields:

func (*Worker) Start

func (_m *Worker) Start(ctx context.Context)

Start provides a mock function with given fields: ctx

func (*Worker) Stop

func (_m *Worker) Stop()

Stop provides a mock function with given fields:

type WorkerPool

type WorkerPool struct {
	mock.Mock
}

WorkerPool is an autogenerated mock type for the WorkerPool type

func NewWorkerPool

func NewWorkerPool(t NewWorkerPoolT) *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.

func (*WorkerPool) AddTask

func (_m *WorkerPool) AddTask(task worker.Task)

AddTask provides a mock function with given fields: task

func (*WorkerPool) AddWorkers

func (_m *WorkerPool) AddWorkers(count int)

AddWorkers provides a mock function with given fields: count

func (*WorkerPool) RemoveWorkers

func (_m *WorkerPool) RemoveWorkers(count int)

RemoveWorkers provides a mock function with given fields: count

func (*WorkerPool) Stop

func (_m *WorkerPool) Stop()

Stop provides a mock function with given fields:

func (*WorkerPool) TaskChannel

func (_m *WorkerPool) TaskChannel() chan worker.Task

TaskChannel provides a mock function with given fields:

func (*WorkerPool) WorkersCount

func (_m *WorkerPool) WorkersCount() int

WorkersCount 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