Import path:
gitlab.soludian.com/soludian/fountain/libs/ftasker/fcroner
fcroner
go
import "gitlab.soludian.com/soludian/fountain/libs/ftasker/fcroner"Index
- Constants
- type Entry
- type EntryID
- type FCroner
- type FuncJob
- type Job
- type JobWrapper
- type NamedJob
- type Option
- func WithConfig(conf *config) Option
- func WithEnvironment(env string) Option
- func WithJob(job FuncJob) Option
- func WithLocation(loc *time.Location) Option
- func WithLock(lock locker.Lock) Option
- func WithName(name string) Option
- func WithParser(p fcron.Parser) Option
- func WithSeconds() Option
- func WithWrappers(wrappers ...JobWrapper) Option
- type Parser
- type Schedule
Constants
go
const KPackageName = "fcroner"type Entry
Entry...
go
type Entry = fcron.Entrytype EntryID
EntryID...
go
type EntryID = fcron.EntryIDtype FCroner
FCroner...
go
type FCroner struct {
// contains filtered or unexported fields
}func InstallFountainInstance
go
func InstallFountainInstance(options ...Option) *FCronerfunc (*FCroner) GetName
go
func (c *FCroner) GetName() stringName name
func (*FCroner) Start
go
func (c *FCroner) Start() errorStart...
func (*FCroner) Stop
go
func (c *FCroner) Stop() errorStop...
type FuncJob
FuncJob...
go
type FuncJob func(ctx context.Context) errorfunc (FuncJob) Name
go
func (f FuncJob) Name() stringName...
func (FuncJob) Run
go
func (f FuncJob) Run(ctx context.Context) errorRun...
type Job
Job...
go
type Job = fcron.Jobtype JobWrapper
JobWrapper...
go
type JobWrapper = fcron.JobWrappertype NamedJob
NamedJob..
go
type NamedJob interface {
Run(ctx context.Context) error
Name() string
}type Option
Option...
go
type Option func(c *config)func WithConfig
go
func WithConfig(conf *config) OptionWithConfig Required.
func WithEnvironment
go
func WithEnvironment(env string) Optionfunc WithJob
go
func WithJob(job FuncJob) OptionWithJob specifies the Job
func WithLocation
go
func WithLocation(loc *time.Location) OptionWithLocation sets the time zone
func WithLock
go
func WithLock(lock locker.Lock) OptionWithLock sets the distributed lock. When Config.EnableDistributedTask = true, this Option must be set
func WithName
go
func WithName(name string) Optionfunc WithParser
go
func WithParser(p fcron.Parser) OptionWithParser sets the time parser
func WithSeconds
go
func WithSeconds() OptionWithSeconds turns on the second unit
func WithWrappers
go
func WithWrappers(wrappers ...JobWrapper) OptionWithWrappers sets the JobWrapper
type Parser
Parser...
go
type Parser = fcron.Parsertype Schedule
Schedule...
go
type Schedule = fcron.ScheduleGenerated by gomarkdoc