Documentation ¶
Index ¶
- type FunctionExecutor
- func (FunctionExecutor) CaddyModule() caddy.ModuleInfo
- func (fex *FunctionExecutor) Cleanup() error
- func (fex *FunctionExecutor) Provision(ctx caddy.Context) error
- func (fex FunctionExecutor) ServeHTTP(resp http.ResponseWriter, req *http.Request, next caddyhttp.Handler) error
- func (fex *FunctionExecutor) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FunctionExecutor ¶
type FunctionExecutor struct { // Name stores the name associated with the function. Name string `json:"name,omitempty"` // Runtime stores the runtime of the function, e.g. python. Runtime string `json:"runtime,omitempty"` // EntrypointPath stores the path to the function's entrypoint, e.g. python script path. EntrypointPath string `json:"entrypoint_path,omitempty"` // EntrypointHandler stores the name of the function to invoke at the Entrypoint. e.g handler. EntrypointHandler string `json:"entrypoint_handler,omitempty"` // PythonExecutable stores the path to the python executable. PythonExecutable string `json:"python_executable,omitempty"` // MaxWorkersCount stores the max number of concurrent runtimes. MaxWorkersCount uint `json:"workers,omitempty"` // WorkerTimeout stores the maximum number of seconds a function would run. WorkerTimeout int `json:"worker_timeout,omitempty"` // If URIFilter is not empty, then only the plugin // intercepts only the pages matching the regular expression // in the filter URIFilter string `json:"uri_filter,omitempty"` // contains filtered or unexported fields }
FunctionExecutor is a middleware which triggers execution of a function when it is invoked.
func (FunctionExecutor) CaddyModule ¶
func (FunctionExecutor) CaddyModule() caddy.ModuleInfo
CaddyModule returns the Caddy module information.
func (*FunctionExecutor) Cleanup ¶
func (fex *FunctionExecutor) Cleanup() error
Cleanup implements caddy.CleanerUpper and terminates running processes.
func (*FunctionExecutor) Provision ¶
func (fex *FunctionExecutor) Provision(ctx caddy.Context) error
Provision sets up FunctionExecutor.
func (FunctionExecutor) ServeHTTP ¶
func (fex FunctionExecutor) ServeHTTP(resp http.ResponseWriter, req *http.Request, next caddyhttp.Handler) error
func (*FunctionExecutor) UnmarshalCaddyfile ¶
func (fex *FunctionExecutor) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
UnmarshalCaddyfile sets up the handler from Caddyfile tokens. Syntax:
lambda [<matcher>] { name <name> runtime <name> entrypoint <path> function <name> }
Click to show internal directories.
Click to hide internal directories.