Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Function ¶
Function represents an argument-less function which returns a generic type R and a possible error.
type FunctionJob ¶
type FunctionJob[R any] struct { Result *R Error error JobStatus q.JobStatus // contains filtered or unexported fields }
FunctionJob represents a Job that invokes the passed Function, implements the quartz.Job interface.
func NewFunctionJobWithKey ¶
func NewFunctionJobWithKey[R any](key int, function Function[R]) *FunctionJob[R]
NewFunctionJob returns a new FunctionJob without an explicit description.
func (*FunctionJob[R]) Description ¶
func (f *FunctionJob[R]) Description() string
Description returns the description of the FunctionJob.
func (*FunctionJob[R]) Execute ¶
func (f *FunctionJob[R]) Execute(ctx context.Context)
Execute is called by a Scheduler when the Trigger associated with this job fires. It invokes the held function, setting the results in Result and Error members.
func (*FunctionJob[R]) Key ¶
func (f *FunctionJob[R]) Key() int
Key returns the unique FunctionJob key.
Click to show internal directories.
Click to hide internal directories.