biz

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecTaskReply

type ExecTaskReply struct {
	Type    string `json:"type"`
	Content string `json:"content"`
	Time    uint32 `json:"time"`
}

type ExecTaskReplyFunc

type ExecTaskReplyFunc func(*ExecTaskReply) error

type Task

type Task struct {
	Id            uint32
	Uuid          string
	Type          string
	Value         string
	ExpectCode    uint32
	RetryCount    uint32
	RetryWaitTime uint32
	MaxExecTime   uint32
}

type TaskFactory

type TaskFactory interface {
	ExecTask(ctx kratosx.Context, task *Task, fn ExecTaskReplyFunc) error
	CancelExecTask(uuid string)
}

type TaskUseCase

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

func NewTaskUseCase

func NewTaskUseCase(config *conf.Config, factory TaskFactory) *TaskUseCase

func (*TaskUseCase) CancelExecTask

func (uc *TaskUseCase) CancelExecTask(uuid string)

func (*TaskUseCase) ExecTask

func (uc *TaskUseCase) ExecTask(ctx kratosx.Context, task *Task, fn ExecTaskReplyFunc) error

Jump to

Keyboard shortcuts

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