Documentation ¶
Index ¶
- Constants
- func ContextExtractor(ctx context.Context) []field.Field
- func GetJobName(job Job) string
- func OnStopHook(in OnStopCronIn)
- func OnStopHookOpt() fx.Option
- func Opt() fx.Option
- func ProvideJob(jobConstructor interface{}) fx.Option
- func RegisterJob(in RegisterJobIn) error
- func StartCron(c Engine)
- type Engine
- type Job
- type JobAttributes
- type JobConfig
- type NamedJob
- type OnStopCronIn
- type Properties
- type RegisterJobIn
- type RobfigCron
- type RobfigJob
- type RobfigLogger
Constants ¶
View Source
const ContextLogJobMeta = "job_meta"
View Source
const ContextValueJobName = "job_attributes_name"
View Source
const ContextValueJobRunId = "job_attributes_run_id"
Variables ¶
This section is empty.
Functions ¶
func GetJobName ¶
func OnStopHook ¶
func OnStopHook(in OnStopCronIn)
func OnStopHookOpt ¶
func ProvideJob ¶
func RegisterJob ¶
func RegisterJob(in RegisterJobIn) error
Types ¶
type Engine ¶
func NewDefaultRobfigCron ¶
func NewDefaultRobfigCron(logger log.Logger, props *Properties) Engine
func NewRobfigCron ¶
func NewRobfigCron(c *cron.Cron) Engine
type JobAttributes ¶
type JobAttributes struct { Name string `json:"name,omitempty"` RunId string `json:"run_id,omitempty"` }
func (JobAttributes) MarshalLogObject ¶
func (c JobAttributes) MarshalLogObject(encoder field.ObjectEncoder) error
type Properties ¶
type Properties struct { Jobs []JobConfig EnabledDebugMode bool // contains filtered or unexported fields }
func NewProperties ¶
func NewProperties(loader config.Loader) (*Properties, error)
func (*Properties) PostBinding ¶
func (o *Properties) PostBinding() error
func (*Properties) Prefix ¶
func (o *Properties) Prefix() string
type RegisterJobIn ¶
type RegisterJobIn struct { fx.In Engine Engine Jobs []Job `group:"cron_job"` Props *Properties }
type RobfigCron ¶
type RobfigCron struct {
// contains filtered or unexported fields
}
func (RobfigCron) StartAsync ¶
func (r RobfigCron) StartAsync()
func (RobfigCron) StartSync ¶
func (r RobfigCron) StartSync()
func (RobfigCron) Stop ¶
func (r RobfigCron) Stop()
type RobfigJob ¶
type RobfigJob struct {
// contains filtered or unexported fields
}
func NewRobfigJob ¶
type RobfigLogger ¶
type RobfigLogger struct {
// contains filtered or unexported fields
}
func NewRobfigLogger ¶
func NewRobfigLogger(logger log.Logger, enableScheduleInfo bool) *RobfigLogger
func (RobfigLogger) Error ¶
func (r RobfigLogger) Error(err error, msg string, keysAndValues ...interface{})
func (RobfigLogger) Info ¶
func (r RobfigLogger) Info(msg string, keysAndValues ...interface{})
Click to show internal directories.
Click to hide internal directories.