scheduler

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2024 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scheduler

type Scheduler interface {
	// Should return id
	GetID() string
	//Get ID bson
	GetIDBson() primitive.ObjectID
	// Should run Scheduler every tick
	Run() error
	// Should stop Scheduler
	Stop()
	// Return true/false depends from current state
	IsRun() bool
}

func New

func New(id primitive.ObjectID, interval time.Duration, jobExecutor job_executor.JobExecutor, cache cache.Cache) (Scheduler, error)

Jump to

Keyboard shortcuts

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