Documentation ¶
Index ¶
- func CoreProcessing(httpResp http.ResponseWriter, httpReq *http.Request, ...)
- func InjectEgressHeaders(httpResp http.ResponseWriter)
- func InjectIngressHeaders(httpReq *http.Request)
- func ServeHandler(handler function.ScwFuncV1, options ...Option)
- func SubProcessing(httpResp http.ResponseWriter, httpReq *http.Request) error
- type Option
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CoreProcessing ¶
func CoreProcessing(httpResp http.ResponseWriter, httpReq *http.Request, handler function.ScwFuncV1)
CoreProcessing processes the main core
func InjectEgressHeaders ¶
func InjectEgressHeaders(httpResp http.ResponseWriter)
InjectEgressHeaders simulates the infrastructure output layer where your FaaS will be deployed.
func InjectIngressHeaders ¶
InjectIngressHeaders simulates the infrastructure input layer where your FaaS will be deployed.
func ServeHandler ¶
ServeHandler is the entry point for offline testing. It will serve the handler to a local webserver. Read options.go to check advanced paramenter and documentation.
Note that if handler function panics in real life it would make your function return error 500 but in order to keep error trace panic will occurs anywhen while using this testing server.
func SubProcessing ¶
func SubProcessing(httpResp http.ResponseWriter, httpReq *http.Request) error
SubProcessing simulates speicifc go workflow that can happens in the FaaS environment. The request of the body must complies with subRuntimeRequest type to be processed.