Documentation
¶
Index ¶
- Variables
- type Message
- type Result
- func (r Result) Get(index int, v interface{}) error
- func (r Result) GetBackendKey() string
- func (r Result) GetBool(index int) (bool, error)
- func (r Result) GetFloat64(index int) (float64, error)
- func (r Result) GetInt64(index int) (int64, error)
- func (r Result) GetInterface(index int) (interface{}, error)
- func (r Result) GetString(index int) (string, error)
- func (r Result) GetUint64(index int) (uint64, error)
- func (r Result) Gets(args ...interface{}) error
- func (r Result) IsFinish() bool
- func (r Result) IsSuccess() bool
- func (r *Result) SetStatusRunning()
Constants ¶
This section is empty.
Variables ¶
View Source
var ResultStatus = resultStatusChoice{
Sent: 0,
FirstRunning: 1,
WaitingRetry: 2,
Running: 3,
Success: 4,
Failure: 5,
}
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message struct {
Id string `json:"id"`
WorkerName string `json:"worker_name"`
FuncArgs []string `json:"func_args"` //yjson string slice
TaskCtl controller.TaskCtl `json:"task_ctl"`
}
func NewMessage ¶
func NewMessage(ctl controller.TaskCtl) Message
type Result ¶
type Result struct {
Id string `json:"id"`
Status int `json:"status"` // 0:sent , 1:first running , 2: waiting to retry , 3: running , 4: success , 5: Failure
FuncReturn []string `json:"func_return"`
RetryCount int `json:"retry_count"`
}
func (Result) GetBackendKey ¶
func (Result) GetInterface ¶
过时: 此方法只能用于v2.0.0,高版本中,如果值为int64,uint64类型,会导致获取的值不对 Deprecated: only can use in v2.0.0
func (*Result) SetStatusRunning ¶
func (r *Result) SetStatusRunning()
Click to show internal directories.
Click to hide internal directories.