Documentation ¶
Index ¶
- Constants
- func InitManager() error
- type AsyncManager
- func (m *AsyncManager) CancelTask(taskID string) error
- func (m *AsyncManager) FinishTask(taskID, msg string) error
- func (m *AsyncManager) GetTask(taskID string) (*AsyncTaskStatus, error)
- func (m *AsyncManager) GetTaskIDList() ([]string, error)
- func (m *AsyncManager) RegisterTask(taskID string) (context.Context, error)
- func (m *AsyncManager) StartTask(taskID string) error
- func (m *AsyncManager) TaskFailed(taskID string, errMsg error) error
- type AsyncTaskStatus
Constants ¶
View Source
const ( TaskRegisterStatus = "register" TaskRunningStatus = "running" TaskFinishStatus = "finish" TaskErrorStatus = "error" TaskCancelStatus = "cancel" )
Variables ¶
This section is empty.
Functions ¶
func InitManager ¶
func InitManager() error
Types ¶
type AsyncManager ¶
var GlobalAsyncManager *AsyncManager
func (*AsyncManager) CancelTask ¶
func (m *AsyncManager) CancelTask(taskID string) error
func (*AsyncManager) FinishTask ¶
func (m *AsyncManager) FinishTask(taskID, msg string) error
func (*AsyncManager) GetTask ¶
func (m *AsyncManager) GetTask(taskID string) (*AsyncTaskStatus, error)
func (*AsyncManager) GetTaskIDList ¶
func (m *AsyncManager) GetTaskIDList() ([]string, error)
func (*AsyncManager) RegisterTask ¶
func (m *AsyncManager) RegisterTask(taskID string) (context.Context, error)
func (*AsyncManager) StartTask ¶
func (m *AsyncManager) StartTask(taskID string) error
func (*AsyncManager) TaskFailed ¶
func (m *AsyncManager) TaskFailed(taskID string, errMsg error) error
Click to show internal directories.
Click to hide internal directories.