schedule

package
v0.0.0-...-84faedb Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CronParse

func CronParse(corn string, loc *time.Location, withSeconds bool) (cron.Schedule, error)

Types

type CronScheduler

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

func (*CronScheduler) StartAsync

func (c *CronScheduler) StartAsync(cron string, onExecuting func()) error

func (*CronScheduler) Stop

func (c *CronScheduler) Stop() error

type IScheduler

type IScheduler interface {
	StartAsync(cron string, onExecuting func()) error
	Stop() error
}

func NewCronScheduler

func NewCronScheduler() IScheduler

func NewRedisScheduler

func NewRedisScheduler(addr []string, user, pass, masterName string, db int) IScheduler

type RedisScheduler

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

func (*RedisScheduler) StartAsync

func (r *RedisScheduler) StartAsync(cron string, onExecuting func()) error

func (*RedisScheduler) Stop

func (r *RedisScheduler) Stop() error

Jump to

Keyboard shortcuts

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