daemon

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JobTimeComparator

func JobTimeComparator(job1 interface{}, job2 interface{}) int

JobTimeComparator :

func New

func New(bt define.Beater, config define.Config) define.Scheduler

New :

Types

type Daemon

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

Daemon :

func (*Daemon) Add

func (s *Daemon) Add(task define.Task)

Add :

func (*Daemon) Count

func (s *Daemon) Count() int

Count :

func (*Daemon) Reload

func (s *Daemon) Reload(ctx context.Context, conf define.Config, tasks []define.Task) error

Reload :

func (*Daemon) Start

func (s *Daemon) Start(ctx context.Context) error

Start :

func (Daemon) Stop

func (s Daemon) Stop()

Stop :

func (*Daemon) Wait

func (s *Daemon) Wait()

Wait :

type IntervalJob

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

IntervalJob :

func (*IntervalJob) GetCheckTime

func (j *IntervalJob) GetCheckTime() time.Time

GetCheckTime :

func (*IntervalJob) GetTask

func (j *IntervalJob) GetTask() define.Task

GetTask :

func (*IntervalJob) Init

func (j *IntervalJob) Init()

Init :

func (*IntervalJob) Next

func (j *IntervalJob) Next()

Next :

func (*IntervalJob) Reload

func (j *IntervalJob) Reload()

Reload :

func (*IntervalJob) Run

func (j *IntervalJob) Run(e chan<- define.Event)

Run :

func (*IntervalJob) SetScheduler

func (j *IntervalJob) SetScheduler(s define.Scheduler)

SetScheduler :

func (*IntervalJob) Stop

func (j *IntervalJob) Stop()

Stop :

type Job

type Job interface {
	GetCheckTime() time.Time
	Init()
	Next()
	Run(e chan<- define.Event)
	GetTask() define.Task
	Reload()
	Stop()
	SetScheduler(scheduler define.Scheduler)
}

Job :

func NewJob

func NewJob(task define.Task, scheduler define.Scheduler) Job

NewJob :

type JobQueue

type JobQueue = *LockQueue

JobQueue :

func NewLockQueue

func NewLockQueue() JobQueue

NewLockQueue :

type LockQueue

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

LockQueue :

func (*LockQueue) Clear

func (q *LockQueue) Clear()

Clear :

func (*LockQueue) First

func (q *LockQueue) First() Job

First :

func (*LockQueue) Pop

func (q *LockQueue) Pop() Job

Pop :

func (*LockQueue) PopAll

func (q *LockQueue) PopAll() []Job

PopAll :

func (*LockQueue) PopUntil

func (q *LockQueue) PopUntil(now time.Time) []Job

PopUntil :

func (*LockQueue) Push

func (q *LockQueue) Push(js ...Job)

Push :

func (*LockQueue) Size

func (q *LockQueue) Size() int

Size :

type StroedIntervalJob

type StroedIntervalJob struct {
	*IntervalJob
	// contains filtered or unexported fields
}

StroedIntervalJob :

func (*StroedIntervalJob) Init

func (j *StroedIntervalJob) Init()

Init :

func (*StroedIntervalJob) Next

func (j *StroedIntervalJob) Next()

Next :

Jump to

Keyboard shortcuts

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