Documentation
¶
Index ¶
- func DefaultSubscribeFn(plan_id string, key string, value interface{}, source bool, method string, ...)
- func DefaultTaskFn(plan_id string, task_id string, source bool, method string, ...) (interface{}, error)
- func StringStatus(status plan.Status) string
- type Instance
- type Object
- func (obj *Object) ExportFunction(iso *v8go.Isolate) *v8go.FunctionTemplate
- func (obj *Object) ExportObject(iso *v8go.Isolate) *v8go.ObjectTemplate
- func (obj *Object) ID(info *v8go.FunctionCallbackInfo) (string, error)
- func (obj *Object) NewInstance(id string, this *v8go.Object, data ...interface{}) *v8go.Value
- type Options
- type SubscribeCallback
- type TaskCallback
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultSubscribeFn ¶
func DefaultSubscribeFn(plan_id string, key string, value interface{}, source bool, method string, args ...interface{})
DefaultSubscribeFn is the default subscribe function
func DefaultTaskFn ¶
func DefaultTaskFn(plan_id string, task_id string, source bool, method string, args ...interface{}) (interface{}, error)
DefaultTaskFn is the default task function
func StringStatus ¶
StringStatus convert the plan status to a string
Types ¶
type Instance ¶
type Instance struct {
// contains filtered or unexported fields
}
Instance is the instance of the plan
type Object ¶
type Object struct {
// contains filtered or unexported fields
}
Object Plan Object
func (*Object) ExportFunction ¶
func (obj *Object) ExportFunction(iso *v8go.Isolate) *v8go.FunctionTemplate
ExportFunction Export as a javascript Plan function const plan = new Plan("plan-id");
plan.Add("task-id", 1, function(task, shared) {
shared.Set("foo", "bar");
});
func (*Object) ExportObject ¶
func (obj *Object) ExportObject(iso *v8go.Isolate) *v8go.ObjectTemplate
ExportObject Export as a FS Object
type Options ¶
type Options struct {
TaskFn TaskCallback
SubscribeFn SubscribeCallback
}
Options are the options for the plan object
Click to show internal directories.
Click to hide internal directories.