Documentation ¶
Overview ¶
Default implementation of executor.
In httransform Executor is something which does end processing of the given Context instance. It usually takes an HTTP request and fills HTTP response. It actually has to do that but in reality it can do much more, like request hijacking to support websockets or plain TCP upgrades.
So, Executor is a function which transforms HTTP request to HTTP response. And returns error if something goes wrong during that process.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Executor ¶
Executor transforms HTTP request to HTTP response and does some additional actions like management of connection upgrades.
func MakeDefaultExecutor ¶
MakeDefaultExecutor returns a default implementation of executor which does bare minimum:
1. It sends HTTP request, reads and returns HTTP response.
2. If request wants to upgrade connection (Connection: Upgrade), it hijacks a connection, returns a correct response and does TCP proxyfying of the sockets.
This function is created as a bare minimum to give end user the example on how to implementat his/her own executor.