scheduler

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 6, 2025 License: Apache-2.0 Imports: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpServer

type HttpServer struct {
	// contains filtered or unexported fields
}

func (*HttpServer) CreateTask

func (s *HttpServer) CreateTask(c *gin.Context)

func (*HttpServer) ListTask

func (s *HttpServer) ListTask(c *gin.Context)

ListTask 查询任务列表

func (*HttpServer) OperateTask

func (s *HttpServer) OperateTask(c *gin.Context)

type Scheduler

type Scheduler struct {
	// contains filtered or unexported fields
}

func NewScheduler

func NewScheduler(
	elector election.Interface,
	discover discover.Interface,
	taskRepo taskrepo.Interface,
) (*Scheduler, error)

func (*Scheduler) CreateTask

func (s *Scheduler) CreateTask(ctx context.Context, task *model.Task) error

func (*Scheduler) HttpServer

func (s *Scheduler) HttpServer() *HttpServer

func (*Scheduler) ListTask

func (s *Scheduler) ListTask(ctx context.Context, filter *model.TaskFilter) ([]*model.Task, error)

func (*Scheduler) OperateTask

func (s *Scheduler) OperateTask(ctx context.Context, bizID, taskKey string, nextStatus model.TaskStatus) error

func (*Scheduler) Run

func (s *Scheduler) Run() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL