Documentation ¶
Index ¶
- Variables
- func AddNewCronExecution(wr Worker)
- func CustomErrorInstance() error
- func MakeSchedulerAnchorPoint()
- func StopCronExecution(wr *Worker, scheduler *gocron.Scheduler)
- type CronSchedulerConfig
- type ExecutionException
- type Instrumentation
- type TaskParams
- func (t *TaskParams) Clone() TaskParams
- func (t *TaskParams) GetBytesParam(key string) ([]byte, bool)
- func (t *TaskParams) GetComplexParam(key string) (*any, bool)
- func (t *TaskParams) GetFloatParam(key string) (float64, bool)
- func (t *TaskParams) GetIntParam(key string) (int, bool)
- func (t *TaskParams) GetParams() map[string]interface{}
- func (t *TaskParams) GetStringParam(key string) (string, bool)
- func (t *TaskParams) SetBytesParam(key string, value []byte)
- func (t *TaskParams) SetComplexParam(key string, value *any)
- func (t *TaskParams) SetFloatParam(key string, value float64)
- func (t *TaskParams) SetIntParam(key string, value int)
- func (t *TaskParams) SetStringParam(key string, value string)
- type TypeOfExecution
- type Worker
- type WorkerError
Constants ¶
This section is empty.
Variables ¶
View Source
var TypeOfExecutionEnum = struct { Async TypeOfExecution Sync TypeOfExecution }{Async: 0, Sync: 1}
Functions ¶
func AddNewCronExecution ¶
func AddNewCronExecution(wr Worker)
func CustomErrorInstance ¶
func CustomErrorInstance() error
func MakeSchedulerAnchorPoint ¶
func MakeSchedulerAnchorPoint()
func StopCronExecution ¶
Types ¶
type CronSchedulerConfig ¶
type CronSchedulerConfig struct { IntervalInSeconds int TypeOfExecution TypeOfExecution }
type ExecutionException ¶
type Instrumentation ¶
type Instrumentation struct { FuncDispatcher func(ctx context.Context, data TaskParams) (TaskParams, error) NestedCallback func(ctx context.Context, data TaskParams) error TaskArguments TaskParams FuncName string }
type TaskParams ¶
type TaskParams struct {
Params map[string]interface{}
}
func NewTaskParams ¶
func NewTaskParams() TaskParams
func (*TaskParams) Clone ¶
func (t *TaskParams) Clone() TaskParams
func (*TaskParams) GetBytesParam ¶
func (t *TaskParams) GetBytesParam(key string) ([]byte, bool)
func (*TaskParams) GetComplexParam ¶
func (t *TaskParams) GetComplexParam(key string) (*any, bool)
func (*TaskParams) GetFloatParam ¶
func (t *TaskParams) GetFloatParam(key string) (float64, bool)
func (*TaskParams) GetIntParam ¶
func (t *TaskParams) GetIntParam(key string) (int, bool)
func (*TaskParams) GetParams ¶
func (t *TaskParams) GetParams() map[string]interface{}
func (*TaskParams) GetStringParam ¶
func (t *TaskParams) GetStringParam(key string) (string, bool)
func (*TaskParams) SetBytesParam ¶
func (t *TaskParams) SetBytesParam(key string, value []byte)
func (*TaskParams) SetComplexParam ¶
func (t *TaskParams) SetComplexParam(key string, value *any)
func (*TaskParams) SetFloatParam ¶
func (t *TaskParams) SetFloatParam(key string, value float64)
func (*TaskParams) SetIntParam ¶
func (t *TaskParams) SetIntParam(key string, value int)
func (*TaskParams) SetStringParam ¶
func (t *TaskParams) SetStringParam(key string, value string)
type TypeOfExecution ¶
type TypeOfExecution int64
type Worker ¶
type Worker struct { SourceContext context.Context Instrumentation Instrumentation Callback func(ctx context.Context) ExecsPerTick []int TickDuration time.Duration CronSchedulerConfig CronSchedulerConfig }
type WorkerError ¶
type WorkerError struct {
// contains filtered or unexported fields
}
func WorkerErrorInstance ¶
func WorkerErrorInstance(error string) *WorkerError
func (*WorkerError) Error ¶
func (e *WorkerError) Error() string
func (WorkerError) ExecutionError ¶
func (e WorkerError) ExecutionError(args []string) *error
func (WorkerError) ListenErrosHappned ¶
func (w WorkerError) ListenErrosHappned()
func (*WorkerError) RegisterMetricsCount ¶
func (e *WorkerError) RegisterMetricsCount( errorName string, count int64, errorTags []string, )
Click to show internal directories.
Click to hide internal directories.