Documentation ¶
Index ¶
Constants ¶
View Source
const ( // MethodDELETE is for RegisterChain func, it handles DELETE methods MethodDELETE method = "DELETE" // MethodGET is for RegisterChain func, it handles GET methods MethodGET method = "GET" // MethodHEAD is for RegisterChain func, it handles HEAD methods MethodHEAD method = "HEAD" // MethodOPTIONS is for RegisterChain func, it handles OPTIONS methods MethodOPTIONS method = "OPTIONS" // MethodPATCH is for RegisterChain func, it handles PATCH methods MethodPATCH method = "PATCH" // MethodPOST is for RegisterChain func, it handles POST methods MethodPOST method = "POST" // MethodPUT is for RegisterChain func, it handles PUT methods MethodPUT method = "PUT" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HandlersChain ¶
type HandlersChain map[method]MethodChain
HandlersChain describes a map that stores method chain info.
type Instance ¶
type Instance struct { Router *fasthttprouter.Router // contains filtered or unexported fields }
Instance describes a server instance
func (*Instance) ListenAndServe ¶
ListenAndServe on instance address
func (*Instance) ListenAndServeGZip ¶
ListenAndServeGZip on instance address with default compress middleware
func (*Instance) ListenAndServeGZipLevel ¶
ListenAndServeGZipLevel on instance address with selected compress level NOTE: level should be greater or equal to 0 and lower or equal to 9
func (*Instance) RegisterChain ¶
func (i *Instance) RegisterChain(handlersChain HandlersChain)
RegisterChain adds path handlers for specified method
type MethodChain ¶
type MethodChain map[string]func(*fasthttp.RequestCtx)
MethodChain describes a map that stores handlers for a path
Click to show internal directories.
Click to hide internal directories.