schedule

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: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetScheduleService

func GetScheduleService(path string, opts ...Option) (svc interfaces.ScheduleService, err error)

func NewLogger

func NewLogger() cron.Logger

func NewScheduleService

func NewScheduleService(opts ...Option) (svc2 interfaces.ScheduleService, err error)

func ProvideGetScheduleService

func ProvideGetScheduleService(path string, opts ...Option) func() (svr interfaces.ScheduleService, err error)

func ProvideScheduleService

func ProvideScheduleService(path string, opts ...Option) func() (svc interfaces.ScheduleService, err error)

Types

type Logger

type Logger struct {
}

func (*Logger) Error

func (l *Logger) Error(err error, msg string, keysAndValues ...interface{})

func (*Logger) Info

func (l *Logger) Info(msg string, keysAndValues ...interface{})

type Option

type Option func(svc interfaces.ScheduleService)

func WithConfigPath

func WithConfigPath(path string) Option

func WithDelayIfStillRunning

func WithDelayIfStillRunning() Option

func WithLocation

func WithLocation(loc *time.Location) Option

func WithSkipIfStillRunning

func WithSkipIfStillRunning() Option

func WithUpdateInterval

func WithUpdateInterval(interval time.Duration) Option

type Service

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

func (*Service) Disable

func (svc *Service) Disable(s interfaces.Schedule, args ...interface{}) (err error)

func (*Service) Enable

func (svc *Service) Enable(s interfaces.Schedule, args ...interface{}) (err error)

func (*Service) GetCron

func (svc *Service) GetCron() (c *cron.Cron)

func (*Service) GetDelay

func (svc *Service) GetDelay() (delay bool)

func (*Service) GetLocation

func (svc *Service) GetLocation() (loc *time.Location)

func (*Service) GetSkip

func (svc *Service) GetSkip() (skip bool)

func (*Service) GetUpdateInterval

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

func (*Service) Init

func (svc *Service) Init() (err error)

func (*Service) SetDelay

func (svc *Service) SetDelay(delay bool)

func (*Service) SetLocation

func (svc *Service) SetLocation(loc *time.Location)

func (*Service) SetSkip

func (svc *Service) SetSkip(skip bool)

func (*Service) SetUpdateInterval

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

func (*Service) Start

func (svc *Service) Start()

func (*Service) Stop

func (svc *Service) Stop()

func (*Service) Update

func (svc *Service) Update()

func (*Service) Wait

func (svc *Service) Wait()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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