model

package
v0.0.0-...-ce3f185 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GET_TASK_LIST_SUFFIX         = version + "/get_task_list"
	GET_TASK_SUFFIX              = version + "/get_task"
	HOLD_TASKS                   = version + "/hold_tasks"
	SET_TASK_SUFFIX              = version + "/set_task"
	CREATE_TASK_SUFFIX           = version + "/create_task"
	GET_TASK_SCHEDULE_CFG_SUFFIX = version + "/get_task_schedule_cfg_list"
)
View Source
const (
	SCHEDULE_TASK_LIMIT = 100
)
View Source
const (
	STATS_TASK_COUNT = "/stats_task_count"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateTaskReq

type CreateTaskReq struct {
	TaskData TaskData `json:"task_data"`
}

type CreateTaskResp

type CreateTaskResp struct {
	RespBase
	TaskId string `json:"task_id"`
}

type GetTaskCountsBtStatusReq

type GetTaskCountsBtStatusReq struct {
	Status int `json:"status"`
}

type GetTaskCountsBtStatusResp

type GetTaskCountsBtStatusResp struct {
	RespBase
	Count int `json:"count"`
}

type GetTaskCountsByTypeReq

type GetTaskCountsByTypeReq struct {
	TaskType string `json:"task_type"`
}

type GetTaskCountsByTypeResp

type GetTaskCountsByTypeResp struct {
	RespBase
	Count int `json:"count"`
}

type GetTaskListReq

type GetTaskListReq struct {
	TaskType string `json:"task_type"`
	Status   int    `json:"status"`
	Limit    int    `json:"limit"`
}

type GetTaskListResp

type GetTaskListResp struct {
	RespBase
	TaskList []*TaskData `json:"task_list"`
}

type GetTaskReq

type GetTaskReq struct {
	TaskId string `json:"task_id"`
}

type GetTaskResp

type GetTaskResp struct {
	RespBase
	TaskData *TaskData `json:"task_data"`
}

type GetTaskScheduleCfgListReq

type GetTaskScheduleCfgListReq struct {
}

GetTaskScheduleCfgListReq 获取任务配置信息 请求体(空)

type GetTaskScheduleCfgListResp

type GetTaskScheduleCfgListResp struct {
	RespBase
	ScheduleCfgList []*TaskScheduleCfg `json:"task_schedule_cfg_list"`
}

GetTaskScheduleCfgListResp 获取任务配置信息 响应体

type HoldTasksReq

type HoldTasksReq struct {
	TaskType string `json:"task_type"`
	Limit    int    `json:"limit"`
}

type HoldTasksResp

type HoldTasksResp struct {
	RespBase
	TaskList []*TaskData `json:"task_list"`
}

type RegisterTaskReq

type RegisterTaskReq struct {
	TaskType string `json:"task_type"`
}

type RegisterTaskResp

type RegisterTaskResp struct {
	RespBase
}

type RespBase

type RespBase struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
}

type SetTaskReq

type SetTaskReq struct {
	TaskData `json:"task_data"`
}

SetTaskReq 请求消息

type SetTaskResp

type SetTaskResp struct {
	RespBase
}

SetTaskResp 响应消息

type TaskData

type TaskData struct {
	UserId           string    `json:"user_id"`
	TaskId           string    `json:"task_id"`
	TaskType         string    `json:"task_type"`
	TaskStage        string    `json:"task_stage"`
	Status           int64     `json:"status"`
	Priority         *int64    `json:"priority"`
	CrtRetryNum      int64     `json:"crt_retry_num"`
	MaxRetryNum      int64     `json:"max_retry_num"`
	MaxRetryInterval int64     `json:"max_retry_interval"`
	ScheduleLog      string    `json:"schedule_log"`
	TaskContext      string    `json:"context"`
	OrderTime        int64     `json:"order_time"`
	CreateTime       time.Time `json:"create_time"`
	ModifyTime       time.Time `json:"modify_time"`
}

type TaskScheduleCfg

type TaskScheduleCfg struct {
	TaskType          string     `json:"task_type"`
	ScheduleLimit     int        `json:"schedule_limit"`
	ScheduleInterval  int        `json:"schedule_interval"`
	MaxProcessingTime int64      `json:"max_processing_time"`
	MaxRetryNum       int        `json:"max_retry_num"`
	RetryInterval     int        `json:"retry_interval"`
	MaxRetryInterval  int        `json:"max_retry_interval"`
	CreateTime        *time.Time `json:"create_time"`
	ModifyTime        *time.Time `json:"modify_time"`
}

TaskScheduleCfg 任务调度信息

Jump to

Keyboard shortcuts

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