Documentation ¶
Index ¶
- Constants
- Variables
- type TaskInfo
- func (ti *TaskInfo) CloseBound()
- func (ti *TaskInfo) CloseSockJSSession(reason string, status uint32)
- func (ti *TaskInfo) GetBound() chan error
- func (ti *TaskInfo) GetId() int
- func (ti *TaskInfo) IntoBound(msg error)
- func (ti *TaskInfo) SendMsg(msg interface{})
- func (ti *TaskInfo) SetBound(c chan error)
- func (ti *TaskInfo) SetId(id int)
- func (ti *TaskInfo) SetSockJSSession(s sockjs.Session)
- type TaskMap
Constants ¶
View Source
const ( StatusNew = 0 //新建 StatusRunning = 1 //运行中 StatusEnd = 2 //已完成 StatusError = 3 //错误 )
任务状态
Variables ¶
View Source
var TaskInfos = &TaskMap{TaskInfos: make(map[int]wsTaskInfo.WsTaskInfo)}
Functions ¶
This section is empty.
Types ¶
type TaskInfo ¶
type TaskInfo struct { Name string Path string Progress *model.StatusUpdate wsTaskInfo.WsTaskInfo // contains filtered or unexported fields }
func (*TaskInfo) CloseBound ¶
func (ti *TaskInfo) CloseBound()
func (*TaskInfo) CloseSockJSSession ¶
func (*TaskInfo) SetSockJSSession ¶
type TaskMap ¶
type TaskMap struct { TaskInfos map[int]wsTaskInfo.WsTaskInfo Lock sync.Mutex wsTaskInfo.WsTask }
func (*TaskMap) Get ¶
func (ti *TaskMap) Get(id int) wsTaskInfo.WsTaskInfo
func (*TaskMap) Set ¶
func (ti *TaskMap) Set(id int, task wsTaskInfo.WsTaskInfo)
Click to show internal directories.
Click to hide internal directories.