scheduler

package
v0.0.0-...-33f46c2 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: Apache-2.0 Imports: 26 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) Enqueue

func (svc *Service) Enqueue(t interfaces.Task) (t2 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