MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / NewJSEventFunction

Function NewJSEventFunction

db/event.go:133–140  ·  view source on GitHub ↗
(ctx context.Context, fnSource string)

Source from the content-addressed store, hash-verified

131}
132
133func 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{}
143func (ef *JSEventFunction) CallFunction(ctx context.Context, event Event) (interface{}, error) {

Callers 3

TestCallValidateFunctionFunction · 0.85
NewWebhookFunction · 0.85

Calls 1

newJsEventTaskFunction · 0.85