Skip to content

Import path: gitlab.soludian.com/soludian/fountain/libs/ftasker/fcroner

fcroner

go
import "gitlab.soludian.com/soludian/fountain/libs/ftasker/fcroner"

Index

Constants

PackageName package name

go
const KPackageName = "fcroner"

type Entry

Entry...

go
type Entry = fcron.Entry

type EntryID

EntryID...

go
type EntryID = fcron.EntryID

type FCroner

FCroner...

go
type FCroner struct {
    // contains filtered or unexported fields
}

func InstallFountainInstance

go
func InstallFountainInstance(options ...Option) *FCroner

func (*FCroner) GetName

go
func (c *FCroner) GetName() string

Name name

func (*FCroner) Start

go
func (c *FCroner) Start() error

Start...

func (*FCroner) Stop

go
func (c *FCroner) Stop() error

Stop...

type FuncJob

FuncJob...

go
type FuncJob func(ctx context.Context) error

func (FuncJob) Name

go
func (f FuncJob) Name() string

Name...

func (FuncJob) Run

go
func (f FuncJob) Run(ctx context.Context) error

Run...

type Job

Job...

go
type Job = fcron.Job

type JobWrapper

JobWrapper...

go
type JobWrapper = fcron.JobWrapper

type 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) Option

WithConfig Required.

func WithEnvironment

go
func WithEnvironment(env string) Option

func WithJob

go
func WithJob(job FuncJob) Option

WithJob specifies the Job

func WithLocation

go
func WithLocation(loc *time.Location) Option

WithLocation sets the time zone

func WithLock

go
func WithLock(lock locker.Lock) Option

WithLock sets the distributed lock. When Config.EnableDistributedTask = true, this Option must be set

func WithName

go
func WithName(name string) Option

func WithParser

go
func WithParser(p fcron.Parser) Option

WithParser sets the time parser

func WithSeconds

go
func WithSeconds() Option

WithSeconds turns on the second unit

func WithWrappers

go
func WithWrappers(wrappers ...JobWrapper) Option

WithWrappers sets the JobWrapper

type Parser

Parser...

go
type Parser = fcron.Parser

type Schedule

Schedule...

go
type Schedule = fcron.Schedule

Generated by gomarkdoc