task_manager

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type Options

type Options struct {
	MaxRetry            int
	TimeGapBetweenRetry time.Duration
}

type TaskManagerMock

type TaskManagerMock struct {
	contracts.TaskManagerInterface

	/*
		You need to substitute *Mock methods to do substitute original functions
	*/
	ConfirmExecutionMock   func(ctx context.Context, tasks []domain.Task) error
	CreateMock             func(ctx context.Context, task *domain.Task, isTaken bool) error
	DeleteMock             func(ctx context.Context, taskId string) error
	GetTasksToCompleteMock func(ctx context.Context, preloadingTimeRange time.Duration) (contracts.CollectionsInterface, error)
}

func (*TaskManagerMock) ConfirmExecution

func (tm *TaskManagerMock) ConfirmExecution(ctx context.Context, tasks []domain.Task) error

func (*TaskManagerMock) Create

func (tm *TaskManagerMock) Create(ctx context.Context, task *domain.Task, isTaken bool) error

func (*TaskManagerMock) Delete

func (tm *TaskManagerMock) Delete(ctx context.Context, taskId string) error

func (*TaskManagerMock) GetTasksToComplete

func (tm *TaskManagerMock) GetTasksToComplete(ctx context.Context, preloadingTimeRange time.Duration) (contracts.CollectionsInterface, error)

Jump to

Keyboard shortcuts

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