Documentation
¶
Index ¶
- Variables
- type Message
- func (m Message) IsDelayMessage() bool
- func (m Message) IsRunTime() bool
- func (m Message) RunTimeAfter(t time.Time) bool
- func (m Message) RunTimeAfterOrEqual(t time.Time) bool
- func (m Message) RunTimeBefore(t time.Time) bool
- func (m Message) RunTimeBeforeOrEqual(t time.Time) bool
- func (m Message) RunTimeEqual(t time.Time) bool
- func (m *Message) SetArgs(args ...interface{}) error
- 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,
Expired: 6,
}
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
func (Message) IsDelayMessage ¶ added in v2.2.0
func (Message) RunTimeAfterOrEqual ¶ added in v2.2.0
func (Message) RunTimeBeforeOrEqual ¶ added in v2.2.0
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 ¶
过时: 此方法只能用于v1.0.0,高版本中,如果值为int64,uint64类型,会导致获取的值不对 Deprecated: only can use in v1.0.0
func (*Result) SetStatusRunning ¶
func (r *Result) SetStatusRunning()
Click to show internal directories.
Click to hide internal directories.