Documentation ¶
Index ¶
- func AddTask(task *Task) error
- func RemoveTask(task *Task) error
- func Update(task *Task) error
- type Identifier
- type Task
- func (t *Task) GenerateUUID()
- func (t *Task) GetUnitByName(name string) (unit *unit.Unit, err error)
- func (t *Task) ID() string
- func (t *Task) Run(ts types.TupleSpace) error
- func (t *Task) SetEvent(e *event.Event)
- func (t *Task) Subscribe() error
- func (t *Task) UnmarshalJSON(data []byte) error
- func (t *Task) Unsubscribe() error
- func (t *Task) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Identifier ¶
type Identifier interface {
ID() string
}
Identifier is a interface for units that have a unique identifier
type Task ¶
type Task struct { UUID string `json:"uuid"` Name string `json:"name"` Event *event.Proxy `json:"event"` Actions []*unit.Unit `json:"actions"` Queue chan types.TupleSpace `json:"-"` // contains filtered or unexported fields }
Task is an object that processes data based on events, converters and actions
func GetTaskByID ¶
GetTaskByID returns the task among the registered tasks where the id matches
func GetTaskByName ¶
GetTaskByName retrieves a task by its name
func (*Task) GenerateUUID ¶
func (t *Task) GenerateUUID()
GenerateUUID genereates a new id for the task
func (*Task) GetUnitByName ¶
GetUnitByName retrieves a unit in the actions list and returns it
func (*Task) UnmarshalJSON ¶
UnmarshalJSON for JSON serialization
func (*Task) Unsubscribe ¶
Unsubscribe removed this task as an observer for its event
Click to show internal directories.
Click to hide internal directories.