Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallTask ¶
type CallTask struct { ID int64 Function otto.Value Args []interface{} Value chan otto.Value Error chan error SoftError bool }
CallTask schedules an otto.Value (which should be a function) to be called with a specific set of arguments. It has two channels for communicating the result of the call.
func NewCallTask ¶
NewCallTask creates a new CallTask object for a given otto.Value (which should be a function) and set of arguments, creating two buffered channels for the response.
func (CallTask) Cancel ¶
func (c CallTask) Cancel()
Cancel does nothing for a CallTask, as there's nothing to clean up.
type EvalTask ¶
type EvalTask struct { ID int64 Script interface{} Value chan otto.Value Error chan error SoftError bool }
EvalTask schedules running an otto.Script. It has two channels for communicating the result of the execution.
func NewEvalTask ¶
func NewEvalTask(s interface{}) *EvalTask
NewEvalTask creates a new EvalTask for a given otto.Script, creating two buffered channels for the response.
func (EvalTask) Cancel ¶
func (e EvalTask) Cancel()
Cancel does nothing for an EvalTask, as there's nothing to clean up.
type IdleTask ¶
type IdleTask struct {
ID int64
}
IdleTask is designed to sit in a loop and keep it active, without doing any work.
func (IdleTask) Cancel ¶
func (i IdleTask) Cancel()
Cancel does nothing on an IdleTask, as there's nothing to clean up.