Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel struct { Name string `json:"name"` Task chan Task `json:"-"` Distinct bool `json:"distinct"` WorkerCount int `json:"worker_count"` StopChan chan struct{} `json:"-"` OutputChan chan Output `json:"-"` }
Channel is the command queue
type PrepareTask ¶
type PrepareTask struct { ID string `json:"id"` Name string `json:"task"` Command TaskCommand `json:"command"` Channel string `json:"chan"` Timestamp int64 `json:"ts"` ExecuteAt int64 `json:"execute_at"` }
PrepareTask is the task that prepared to join queue
type Task ¶
type Task struct { ID string `json:"task_id"` TaskName string `json:"task_name"` Command TaskCommand `json:"command"` Channel string `json:"channel"` Status string `json:"status"` ExecAt time.Time `json:"execute_at"` RetryCount int `json:"retry_count"` FailedAt time.Time `json:"failed_at"` WriteBackend bool `json:"write_backend"` }
Task represent a task object
type TaskCommand ¶
type TaskCommand struct { Name string `json:"name"` Args []interface{} `json:"args"` }
TaskCommand represent a task command object
func (TaskCommand) Format ¶
func (cmd TaskCommand) Format() string
Format format command struct to string
func (TaskCommand) GetArgsString ¶
func (cmd TaskCommand) GetArgsString() []string
GetArgsString 以字符串数组的形式返回参数集合
Click to show internal directories.
Click to hide internal directories.