scheduler

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2022 License: BSD-3-Clause Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTaskSchedulerService

func GetTaskSchedulerService(path string, opts ...Option) (svr interfaces.TaskSchedulerService, err error)

func NewTaskSchedulerService

func NewTaskSchedulerService(opts ...Option) (svc2 interfaces.TaskSchedulerService, err error)

func ProvideGetTaskSchedulerService

func ProvideGetTaskSchedulerService(path string, opts ...Option) func() (svr interfaces.TaskSchedulerService, err error)

func ProvideTaskSchedulerService

func ProvideTaskSchedulerService(path string, opts ...Option) func() (svc interfaces.TaskSchedulerService, err error)

Types

type Option

type Option func(svc interfaces.TaskSchedulerService)

func WithConfigPath

func WithConfigPath(path string) Option

func WithInterval

func WithInterval(interval time.Duration) Option

type Service

type Service struct {
	// dependencies
	interfaces.TaskBaseService
	// contains filtered or unexported fields
}

func (*Service) Cancel

func (svc *Service) Cancel(id primitive.ObjectID, args ...interface{}) (err error)

func (*Service) Dequeue

func (svc *Service) Dequeue() (tasks []interfaces.Task, err error)

func (*Service) DequeueAndSchedule

func (svc *Service) DequeueAndSchedule()

func (*Service) Enqueue

func (svc *Service) Enqueue(t interfaces.Task) (err error)

func (*Service) Schedule

func (svc *Service) Schedule(tasks []interfaces.Task) (err error)

func (*Service) SetInterval

func (svc *Service) SetInterval(interval time.Duration)

func (*Service) Start

func (svc *Service) Start()

Jump to

Keyboard shortcuts

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