service

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2025 License: MIT Imports: 24 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cronjob added in v1.8.0

type Cronjob interface {
	Create(ctx context.Context, task domain.Task) error
}

func NewCronjob added in v1.8.0

func NewCronjob(execService ExecService) Cronjob

type ExecService added in v1.8.0

type ExecService interface {
	Execute(ctx context.Context, task domain.Task) error
}

func NewExecService added in v1.8.0

func NewExecService(workerSvc worker.Service) ExecService

type Service

type Service interface {
	// CreateTask 创建任务
	CreateTask(ctx context.Context, processInstId int, nodeId string) error
	// StartTask 启动任务
	StartTask(ctx context.Context, processInstId int, nodeId string) error
	RetryTask(ctx context.Context, id int64) error
	UpdateTaskStatus(ctx context.Context, req domain.TaskResult) (int64, error)
	UpdateArgs(ctx context.Context, id int64, args map[string]interface{}) (int64, error)
	UpdateVariables(ctx context.Context, id int64, variables []domain.Variables) (int64, error)
	// ListTaskByStatus 列表任务
	ListTaskByStatus(ctx context.Context, offset, limit int64, status uint8) ([]domain.Task, int64, error)
	ListTask(ctx context.Context, offset, limit int64) ([]domain.Task, int64, error)
	ListTaskByInstanceId(ctx context.Context, offset, limit int64, instanceId int) ([]domain.Task, int64, error)

	ListSuccessTasksByUtime(ctx context.Context, offset, limit int64, utime int64) ([]domain.Task, int64, error)

	// FindTaskResult 查找自动化任务
	FindTaskResult(ctx context.Context, instanceId int, nodeId string) (domain.Task, error)

	// Detail 查看任务信息
	Detail(ctx context.Context, id int64) (domain.Task, error)

	// MarkTaskAsAutoPassed 自动化通过处理成功标记
	MarkTaskAsAutoPassed(ctx context.Context, id int64) error
}

func NewService

func NewService(repo repository.TaskRepository, orderSvc order.Service, workflowSvc workflow.Service,
	codebookSvc codebook.Service, runnerSvc runner.Service, cronjobSvc Cronjob, engineSvc engine.Service,
	userSvc user.Service, execSvc ExecService, discoverySvc discovery.Service) Service

Jump to

Keyboard shortcuts

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