Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrTaskNil = errors.New("Task must be not nil") // ErrTaskMustBeFunc ... ErrTaskMustBeFunc = errors.New("Task must be a func type") // ErrTaskReturnsNoValue ... ErrTaskReturnsNoValue = errors.New("Task must return at least a single value") // ErrLastReturnValueMustBeError .. ErrLastReturnValueMustBeError = errors.New("Last return value of a task must be error") )
Functions ¶
func HumanReadableResults ¶
HumanReadableResults ...
func ReflectTaskResults ¶
func ReflectTaskResults(taskResults []*TaskResult) ([]reflect.Value, error)
ReflectTaskResults ...
Types ¶
type Task ¶
type Task struct { TaskId string TaskFunc interface{} Args []TaskArgument // TaskStatus PreTaskHandler func(*Task) error PostTaskHandler func(*Task) error }
func (*Task) Run ¶
func (t *Task) Run() ([]*TaskResult, error)
type TaskArgument ¶
type TaskArgument struct { Type string `json:"type"` Value interface{} `json:"value"` }
Types which can be used: bool, string, int int8 int16 int32 int64, uint uint8 uint16 uint32 uint64, float32 float64
type TaskResult ¶
type TaskResult struct { Type string `json:"type"` Value interface{} `json:"value"` }
TaskResult represents an actual return value of a processed task
Click to show internal directories.
Click to hide internal directories.