Documentation ¶
Index ¶
- func NewModuleEventLoop(printer console.Printer, modCtx modules.RuntimeContext, ...) (*eventloop.EventLoop, error)
- func RunAndWaitForResult(rt *goja.Runtime, fn goja.Callable, args ...goja.Value) (res goja.Value, err error)
- type ErrorHandlerFunc
- type FetchUpstreamUrlFunc
- type NoopPrinter
- type RequestHandlerFunc
- type RequestModifierFunc
- type ResponseModifierFunc
- type Results
- type RuntimeOptions
- type TrackerEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewModuleEventLoop ¶
Types ¶
type ErrorHandlerFunc ¶
type ErrorHandlerFunc func(*types.ModuleContext, error) error
func DefaultErrorHandlerFunction ¶
func DefaultErrorHandlerFunction() ErrorHandlerFunc
func ExtractErrorHandlerFunction ¶
func ExtractErrorHandlerFunction( loop *eventloop.EventLoop, ) (errorHandler ErrorHandlerFunc, err error)
type FetchUpstreamUrlFunc ¶
type FetchUpstreamUrlFunc func(*types.ModuleContext) (*url.URL, error)
this can be used to create custom load balancing strategies, by default it uses round robin
func DefaultFetchUpstreamFunction ¶
func DefaultFetchUpstreamFunction() FetchUpstreamUrlFunc
func ExtractFetchUpstreamFunction ¶
func ExtractFetchUpstreamFunction( loop *eventloop.EventLoop, ) (fetchUpstream FetchUpstreamUrlFunc, err error)
const _ goja.AsyncContextTracker = ExtractorContextTracker{""}
type NoopPrinter ¶
type NoopPrinter struct{}
func (*NoopPrinter) Error ¶
func (p *NoopPrinter) Error(string)
func (*NoopPrinter) Log ¶
func (p *NoopPrinter) Log(string)
func (*NoopPrinter) Warn ¶
func (p *NoopPrinter) Warn(string)
type RequestHandlerFunc ¶
type RequestHandlerFunc func(*types.ModuleContext) error
func ExtractRequestHandlerFunction ¶
func ExtractRequestHandlerFunction( loop *eventloop.EventLoop, ) (requestHandler RequestHandlerFunc, err error)
type RequestModifierFunc ¶
type RequestModifierFunc func(*types.ModuleContext) error
func ExtractRequestModifierFunction ¶
func ExtractRequestModifierFunction( loop *eventloop.EventLoop, ) (requestModifier RequestModifierFunc, err error)
type ResponseModifierFunc ¶
type ResponseModifierFunc func(*types.ModuleContext, *http.Response) error
func ExtractResponseModifierFunction ¶
func ExtractResponseModifierFunction( loop *eventloop.EventLoop, ) (responseModifier ResponseModifierFunc, err error)
type RuntimeOptions ¶
Click to show internal directories.
Click to hide internal directories.