Documentation ¶
Index ¶
- type PolicyLoader
- type Worker
- func (w *Worker) Run(ctx context.Context) error
- func (w *Worker) Start() error
- func (w *Worker) UseCoreExecutionManager(executionMgr task.ExecutionManager) *Worker
- func (w *Worker) UseCoreScheduler(scheduler scheduler.Scheduler) *Worker
- func (w *Worker) UseCoreTaskManager(taskManager task.Manager) *Worker
- func (w *Worker) UseManager(mgr mgt.Manager) *Worker
- func (w *Worker) UseMonitorRedisClient(redisConfig *config.RedisPoolConfig) *Worker
- func (w *Worker) UseQueueStatusManager(queueStatusManager queuestatus.Manager) *Worker
- func (w *Worker) UseScheduler(scheduler period.Scheduler) *Worker
- func (w *Worker) WithContext(ctx *env.Context) *Worker
- func (w *Worker) WithCoreInternalAddr(addr string) *Worker
- func (w *Worker) WithPolicyLoader(loader PolicyLoader) *Worker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PolicyLoader ¶
PolicyLoader is a func template to load schedule policies from js datastore.
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
Worker is designed to sync the schedules in the database into jobservice datastore.
func (*Worker) UseCoreExecutionManager ¶
func (w *Worker) UseCoreExecutionManager(executionMgr task.ExecutionManager) *Worker
UseCoreExecutionManager refers the core execution manager.
func (*Worker) UseCoreScheduler ¶
UseCoreScheduler refers the core scheduler.
func (*Worker) UseCoreTaskManager ¶
UseCoreTaskManager refers the core task manager.
func (*Worker) UseManager ¶
UseManager refers the mgt.Manager.
func (*Worker) UseMonitorRedisClient ¶
func (w *Worker) UseMonitorRedisClient(redisConfig *config.RedisPoolConfig) *Worker
UseMonitorRedisClient refers the monitor redis client.
func (*Worker) UseQueueStatusManager ¶
func (w *Worker) UseQueueStatusManager(queueStatusManager queuestatus.Manager) *Worker
UseQueueStatusManager refers the queue status manager.
func (*Worker) UseScheduler ¶
UseScheduler refers the period.Scheduler.
func (*Worker) WithContext ¶
WithContext set context.
func (*Worker) WithCoreInternalAddr ¶
WithCoreInternalAddr sets the internal addr of core.
func (*Worker) WithPolicyLoader ¶
func (w *Worker) WithPolicyLoader(loader PolicyLoader) *Worker
WithPolicyLoader determines the policy loader func.