HandlerFunc

Type aliasin fsthttpcompute-sdk-go v1.11.0View source
type HandlerFunc func(ctx context.Context, w ResponseWriter, r *Request)

Alias for func(ctx context.Context, w ResponseWriter, r *Request).

HandlerFunc adapts a function to a Handler.

Methods

ServeHTTP

View source
func (f HandlerFunc) ServeHTTP(ctx context.Context, w ResponseWriter, r *Request)

ServeHTTP implements Handler by calling f(ctx, w, r).

Parameters

ctx: context.Context
w: ResponseWriter
r: *Request