utils

package
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2019 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(w http.ResponseWriter, r *http.Request, h Handle)

Handler receives an HTTP request and response and a handler function It manages timeouts and prometheus metrics

func ListenAndServe

func ListenAndServe()

ListenAndServe starts an HTTP server in FUNC_PORT using custom logging

Types

type Handle

type Handle func(ctx context.Context, w http.ResponseWriter, r *http.Request) ([]byte, error)

Handle type receive the context elements of a HTTP request to process it

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL