func NewChannelMapper(fnSource string) *ChannelMapper {
	return &ChannelMapper{
		JSServer: sgbucket.NewJSServer(fnSource, kTaskCacheSize,
			func(fnSource string) (sgbucket.JSServerTask, error) {
				return NewSyncRunner(fnSource)
			}),
	}
}
Example #2
0
func NewJSEventFunction(fnSource string) *JSEventFunction {

	base.LogTo("Events", "Creating new JSEventFunction")
	return &JSEventFunction{
		JSServer: sgbucket.NewJSServer(fnSource, kTaskCacheSize,
			func(fnSource string) (sgbucket.JSServerTask, error) {
				return newJsEventTask(fnSource)
			}),
	}
}