cron

package
v0.0.0-...-059fb3b Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cron

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

func New

func New(name string, pauseDuration time.Duration, tools tools.Tools, job CronRunner) *Cron

func (*Cron) FXRegister

func (s *Cron) FXRegister(lc fx.Lifecycle)

func (*Cron) RunLoop

func (s *Cron) RunLoop()

func (*Cron) Stop

func (s *Cron) Stop()

type CronRunner

type CronRunner interface {
	Run(ctx context.Context) error
}

type MockCronRunner

type MockCronRunner struct {
	mock.Mock
}

MockCronRunner is an autogenerated mock type for the CronRunner type

func NewMockCronRunner

func NewMockCronRunner(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockCronRunner

NewMockCronRunner creates a new instance of MockCronRunner. 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 (*MockCronRunner) Run

func (_m *MockCronRunner) Run(ctx context.Context) error

Run provides a mock function with given fields: ctx

Jump to

Keyboard shortcuts

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