async_task

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KnowledgeDeleteTaskType  = 1 //知识库删除
	DocDeleteTaskType        = 2 // 文档列表删除
	DocImportTaskType        = 3 // 文档导入
	DocSegmentImportTaskType = 4 // 文档分片导入
	KnowledgeReportTaskType  = 5 // 知识库社区报告批量导入
)

Variables

This section is empty.

Functions

func AddContainer

func AddContainer(service BusinessTaskService)

func InitAllService

func InitAllService() error

func SubmitTask

func SubmitTask(ctx context.Context, taskType uint32, params interface{}) error

Types

type AsyncTaskClient

type AsyncTaskClient struct {
}

func (AsyncTaskClient) Load

func (c AsyncTaskClient) Load() error

func (AsyncTaskClient) LoadType

func (c AsyncTaskClient) LoadType() string

func (AsyncTaskClient) Stop

func (c AsyncTaskClient) Stop() error

func (AsyncTaskClient) StopPriority

func (c AsyncTaskClient) StopPriority() int

type BusinessTaskService

type BusinessTaskService interface {
	BuildServiceType() uint32
	//InitTask 初始化任务
	InitTask() error
	//SubmitTask 提交任务
	SubmitTask(ctx context.Context, params interface{}) error
}

type DocDeleteParams

type DocDeleteParams struct {
	DocIdList []uint32 `json:"docIdList"`
}

type DocImportTaskParams

type DocImportTaskParams struct {
	TaskId string `json:"taskId"`
}

type DocSegmentImportTaskParams added in v0.2.1

type DocSegmentImportTaskParams struct {
	TaskId string `json:"taskId"`
}

type KnowledgeDeleteParams

type KnowledgeDeleteParams struct {
	KnowledgeId string `json:"knowledgeId"`
}

type KnowledgeReportImportTaskParams added in v0.2.8

type KnowledgeReportImportTaskParams struct {
	TaskId string `json:"taskId"`
}

Jump to

Keyboard shortcuts

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