task

package
v0.0.4-beta Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CronInit

func CronInit()

func Queue

func Queue() queue.Queue

func QueueInit

func QueueInit()

func RegisterCron

func RegisterCron()

func RegisterQueue

func RegisterQueue()

Types

type CronService

type CronService struct {
	Cron    quartz.Scheduler
	Context context.Context
	Cancel  context.CancelFunc
	Data    map[string]func(ctx context.Context) (any, error)
}

func Cron

func Cron() *CronService

func NewCron

func NewCron(i do.Injector) (*CronService, error)

func (*CronService) Check

func (s *CronService) Check(cron string) bool

func (*CronService) Clear

func (s *CronService) Clear() error

func (*CronService) Delete

func (s *CronService) Delete(name string) error

func (*CronService) Exists

func (s *CronService) Exists(name string) bool

func (*CronService) Jobs

func (s *CronService) Jobs() map[string]func(ctx context.Context) (any, error)

func (*CronService) Listener

func (s *CronService) Listener(name string, callback func(ctx context.Context) (any, error))

func (*CronService) Pause

func (s *CronService) Pause(name string) error

func (*CronService) Resume

func (s *CronService) Resume(name string) error

func (*CronService) Scheduler

func (s *CronService) Scheduler(cron string, name string) error

func (*CronService) Shutdown

func (s *CronService) Shutdown() error

func (*CronService) Start

func (s *CronService) Start()

type QueueService

type QueueService struct {
	Queue queue.Queue
}

func NewQueue

func NewQueue(i do.Injector) (*QueueService, error)

func (*QueueService) Shutdown

func (s *QueueService) Shutdown() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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