Documentation
¶
Index ¶
- Variables
- type DefaultWorkflow
- func (w *DefaultWorkflow) CheckTaskFlow() bool
- func (w *DefaultWorkflow) DeleteWork(key int) error
- func (w *DefaultWorkflow) DeleteWorkFlow(tasklist []int)
- func (w *DefaultWorkflow) InsertWork(tasklist []int, weight int)
- func (w *DefaultWorkflow) InsertWorkes(tasklists [][]int, weights []int)
- func (w *DefaultWorkflow) Marshal() ([]byte, error)
- func (w *DefaultWorkflow) Sort() ([]int, bool)
- func (w *DefaultWorkflow) Unmarshal([]byte) error
- type WorkFlow
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrWorkflowTyp = errors.New("work type error")
Functions ¶
This section is empty.
Types ¶
type DefaultWorkflow ¶
type DefaultWorkflow struct {
// contains filtered or unexported fields
}
func NewDefaultWorkflow ¶
func NewDefaultWorkflow() *DefaultWorkflow
func (*DefaultWorkflow) CheckTaskFlow ¶
func (w *DefaultWorkflow) CheckTaskFlow() bool
func (*DefaultWorkflow) DeleteWork ¶
func (w *DefaultWorkflow) DeleteWork(key int) error
func (*DefaultWorkflow) DeleteWorkFlow ¶
func (w *DefaultWorkflow) DeleteWorkFlow(tasklist []int)
todo
func (*DefaultWorkflow) InsertWork ¶
func (w *DefaultWorkflow) InsertWork(tasklist []int, weight int)
func (*DefaultWorkflow) InsertWorkes ¶
func (w *DefaultWorkflow) InsertWorkes(tasklists [][]int, weights []int)
func (*DefaultWorkflow) Marshal ¶
func (w *DefaultWorkflow) Marshal() ([]byte, error)
func (*DefaultWorkflow) Sort ¶
func (w *DefaultWorkflow) Sort() ([]int, bool)
func (*DefaultWorkflow) Unmarshal ¶
func (w *DefaultWorkflow) Unmarshal([]byte) error
type WorkFlow ¶
type WorkFlow interface { // 添加任务依赖关系 InsertWork(tasklist []int, weights int) // 添加多个任务依赖关系 InsertWorkes(tasklists [][]int, weights []int) // 删除任务节点 DeleteWork(key int) error // 删除工作流 DeleteWorkFlow(tasklist []int) // 检测任务流是否可执行 CheckTaskFlow() bool // 输出任务执行顺序 Sort() ([]int, bool) // 序列化邻截表 Marshal() ([]byte, error) // 反序列化邻截表 Unmarshal([]byte) error }
func NewWorkflow ¶
Click to show internal directories.
Click to hide internal directories.