asynctask

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package asynctask package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager interface {
	StartTask(fn func(ctx context.Context))
	Shutdown()
}

Manager handles the lifecycle for async tasks

func NewManager

func NewManager(taskTimeout time.Duration) Manager

NewManager creates a new Manager instance

type MockManager

type MockManager struct {
	mock.Mock
}

MockManager is an autogenerated mock type for the Manager type

func NewMockManager

func NewMockManager(t mockConstructorTestingTNewMockManager) *MockManager

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

func (*MockManager) Shutdown

func (_m *MockManager) Shutdown()

Shutdown provides a mock function with given fields:

func (*MockManager) StartTask

func (_m *MockManager) StartTask(fn func(context.Context))

StartTask provides a mock function with given fields: fn

Jump to

Keyboard shortcuts

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