Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FunctionRequest ¶
type FunctionRequest struct { RequestURI string Method string UserAgent string Process string ProcessArgs []string Environment []string InputReader io.ReadCloser OutputWriter io.Writer ContentLength *int64 }
FunctionRequest stores request for function execution
type FunctionRunner ¶
type FunctionRunner interface {
Run(f FunctionRequest) error
}
FunctionRunner runs a function
type HTTPFunctionRunner ¶
type HTTPFunctionRunner struct { ExecTimeout time.Duration // ExecTimeout the maximum duration or an upstream function call ReadTimeout time.Duration // ReadTimeout for HTTP server WriteTimeout time.Duration // WriteTimeout for HTTP Server Process string // Process to run as fprocess ProcessArgs []string // ProcessArgs to pass to command Command *exec.Cmd StdinPipe io.WriteCloser StdoutPipe io.ReadCloser Client *http.Client UpstreamURL *url.URL BufferHTTPBody bool LogPrefix bool LogBufferSize int LogCallId bool ReverseProxy *httputil.ReverseProxy }
HTTPFunctionRunner creates and maintains one process responsible for handling all calls
func (*HTTPFunctionRunner) Run ¶
func (f *HTTPFunctionRunner) Run(req FunctionRequest, contentLength int64, r *http.Request, w http.ResponseWriter) error
Run a function with a long-running process with a HTTP protocol for communication
func (*HTTPFunctionRunner) Start ¶
func (f *HTTPFunctionRunner) Start() error
Start forks the process used for processing incoming requests
type OpenIDConfiguration ¶
type SerializingForkFunctionRunner ¶
type SerializingForkFunctionRunner struct { ExecTimeout time.Duration LogPrefix bool LogBufferSize int }
SerializingForkFunctionRunner forks a process for each invocation
func (*SerializingForkFunctionRunner) Run ¶
func (f *SerializingForkFunctionRunner) Run(req FunctionRequest, w http.ResponseWriter) error
Run run a fork for each invocation
type StreamingFunctionRunner ¶
StreamingFunctionRunner forks a process for each invocation
func (*StreamingFunctionRunner) Run ¶
func (f *StreamingFunctionRunner) Run(req FunctionRequest) error
Run run a fork for each invocation
Click to show internal directories.
Click to hide internal directories.