Documentation ¶
Index ¶
- func CancelTask(taskId taskmodel.TaskIdType) error
- func CreateTask(taskType uint32, param *taskmodel.TaskParam) (taskmodel.TaskIdType, error)
- func GetTaskStatus(taskId taskmodel.TaskIdType, status *taskmodel.TaskStatusData) error
- func Join() error
- func NotifyStop() error
- func PauseTask(taskId taskmodel.TaskIdType) error
- func RegisterTaskType(register *taskplugin.TaskPluginRegistration) error
- func ResumeTask(taskId taskmodel.TaskIdType) error
- func StartService(role dtfdef.ServiceRole, opts ...ServiceOption) error
- func Version() string
- type ServiceOption
- func WithCollector(collector taskmodel.CollectorInvoker) ServiceOption
- func WithExecutor(executor taskmodel.ExecutorInvoker) ServiceOption
- func WithMongoDB(mongo *extconfig.MongoAddress) ServiceOption
- func WithMySQL(mysql *extconfig.MySQLAddress) ServiceOption
- func WithPrestop(d time.Duration) ServiceOption
- func WithRedis(redis *extconfig.RedisAddress) ServiceOption
- func WithRegisterCollectorHandler(register taskmodel.RegisterCollectorRequestHandler) ServiceOption
- func WithRegisterExecutorHandler(register taskmodel.RegisterExecutorRequestHandler) ServiceOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTask ¶
create a task
func GetTaskStatus ¶
func GetTaskStatus(taskId taskmodel.TaskIdType, status *taskmodel.TaskStatusData) error
retrieve the task status
func RegisterTaskType ¶
func RegisterTaskType(register *taskplugin.TaskPluginRegistration) error
register a task type plugin
func StartService ¶
func StartService(role dtfdef.ServiceRole, opts ...ServiceOption) error
start the specified service
Types ¶
type ServiceOption ¶
type ServiceOption func(config *dtfdef.ServiceConfig)
用于设置服务配置
func WithCollector ¶
func WithCollector(collector taskmodel.CollectorInvoker) ServiceOption
func WithExecutor ¶
func WithExecutor(executor taskmodel.ExecutorInvoker) ServiceOption
func WithMongoDB ¶
func WithMongoDB(mongo *extconfig.MongoAddress) ServiceOption
func WithMySQL ¶
func WithMySQL(mysql *extconfig.MySQLAddress) ServiceOption
func WithPrestop ¶
func WithPrestop(d time.Duration) ServiceOption
func WithRedis ¶
func WithRedis(redis *extconfig.RedisAddress) ServiceOption
func WithRegisterCollectorHandler ¶
func WithRegisterCollectorHandler(register taskmodel.RegisterCollectorRequestHandler) ServiceOption
func WithRegisterExecutorHandler ¶
func WithRegisterExecutorHandler(register taskmodel.RegisterExecutorRequestHandler) ServiceOption
Click to show internal directories.
Click to hide internal directories.