Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetNativeContext ¶
func GetNativeContext(ctx *fasthttp.RequestCtx) context.Context
GetNativeContext retrieve a standard library context from FastHTTP request context.
func WithNativeContext ¶
func WithNativeContext(ctx *fasthttp.RequestCtx, nativeCtx context.Context)
WithNativeContext stores a standard library context into FastHTTP request context.
Types ¶
type HeaderCarrier ¶ added in v1.2.4
type HeaderCarrier struct {
*fasthttp.RequestHeader
}
HeaderCarrier adapts http.Header to satisfy the TextMapCarrier interface.
func NewCarrier ¶ added in v1.2.4
func NewCarrier(in *fasthttp.RequestHeader) *HeaderCarrier
NewCarrier implemented TextMapCarrier
func (HeaderCarrier) Get ¶ added in v1.2.4
func (hc HeaderCarrier) Get(key string) string
Get returns the value associated with the passed key.
func (HeaderCarrier) Keys ¶ added in v1.2.4
func (hc HeaderCarrier) Keys() []string
Keys lists the keys stored in this carrier.
func (HeaderCarrier) Set ¶ added in v1.2.4
func (hc HeaderCarrier) Set(key string, value string)
Set stores the key-value pair.
type Middleware ¶
type Middleware func(next fasthttp.RequestHandler) fasthttp.RequestHandler
func ServerMiddleware ¶
func ServerMiddleware(opts ...mw.Option) Middleware
Click to show internal directories.
Click to hide internal directories.