(ctx context.Context, fnSource string)
| 131 | } |
| 132 | |
| 133 | func NewJSEventFunction(ctx context.Context, fnSource string) *JSEventFunction { |
| 134 | return &JSEventFunction{ |
| 135 | JSServer: sgbucket.NewJSServer(ctx, fnSource, 0, kTaskCacheSize, |
| 136 | func(ctx context.Context, fnSource string, timeout time.Duration) (sgbucket.JSServerTask, error) { |
| 137 | return newJsEventTask(ctx, fnSource) |
| 138 | }), |
| 139 | } |
| 140 | } |
| 141 | |
| 142 | // Calls a jsEventFunction returning an interface{} |
| 143 | func (ef *JSEventFunction) CallFunction(ctx context.Context, event Event) (interface{}, error) { |