taskflow

package
v0.0.0-...-36737da Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Task

type Task struct {
	// contains filtered or unexported fields
}

type TaskFlow

type TaskFlow struct {
	// contains filtered or unexported fields
}

func NewTaskFlow

func NewTaskFlow(name string) *TaskFlow

func (*TaskFlow) AddTask

func (p *TaskFlow) AddTask(name string, run TaskRunFunc, revert TaskRevertFunc)

func (*TaskFlow) GetResult

func (p *TaskFlow) GetResult() map[string]interface{}

func (*TaskFlow) Revert

func (p *TaskFlow) Revert()

func (*TaskFlow) Run

func (p *TaskFlow) Run(params map[string]interface{}) (map[string]interface{}, error)

type TaskRevertFunc

type TaskRevertFunc func(result map[string]interface{}) error

type TaskRunFunc

type TaskRunFunc func(params map[string]interface{}, result map[string]interface{}) (map[string]interface{}, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL