Documentation ¶
Index ¶
- Constants
- func CreateTaskHandler(path string, wsTask WsTask) http.Handler
- type Message
- type Sprint
- type Sprintf
- func (sf *Sprintf) Append(level int, str string)
- func (sf *Sprintf) AppendByForce(level int, str string, force bool)
- func (sf *Sprintf) AppendForClear(level int, str string, save bool)
- func (sf *Sprintf) AppendLimit(level int, str string)
- func (sf *Sprintf) ResetLimitNum()
- func (sf *Sprintf) SendAllLog()
- func (sf *Sprintf) SetMinUpdatePause(d time.Duration)
- func (sf *Sprintf) UpdateTaskInfo(task WsTaskInfo)
- func (sf *Sprintf) Write(p []byte) (n int, err error)
- type WsTask
- type WsTaskInfo
Constants ¶
View Source
const ( Info = 1 Warning = 2 Success = 3 Error = 4 )
View Source
const MaxErrorNum = 10
MaxErrorNum 最大存储数据数量,配合limitNum使用
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Sprintf ¶
type Sprintf struct { Sprints []*Sprint MinUpdatePause time.Duration io.Writer // contains filtered or unexported fields }
func NewSprintf ¶
func NewSprintf(task WsTaskInfo) *Sprintf
func (*Sprintf) AppendForClear ¶
func (*Sprintf) AppendLimit ¶
func (*Sprintf) SendAllLog ¶
func (sf *Sprintf) SendAllLog()
func (*Sprintf) SetMinUpdatePause ¶
func (*Sprintf) UpdateTaskInfo ¶
func (sf *Sprintf) UpdateTaskInfo(task WsTaskInfo)
type WsTask ¶
type WsTask interface { Get(id int) WsTaskInfo Set(id int, task WsTaskInfo) Close(id int, reason string, status uint32) GetCount() int }
Click to show internal directories.
Click to hide internal directories.