httputils

package
v3.27.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2020 License: MIT Imports: 13 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChainMiddlewares

func ChainMiddlewares(handler http.Handler, middlewares ...model.Middleware) http.Handler

ChainMiddlewares chains middlewares call for easy wrapping

Types

type App

type App interface {
	Health(Pinger) App
	Middleware(model.Middleware) App
	ListenAndServe(http.Handler) (*http.Server, <-chan error)
	ListenServeWait(http.Handler)
	Swagger() (swagger.Configuration, error)
}

App of package

func New

func New(config Config) App

New creates new App from Config

type Config

type Config struct {
	// contains filtered or unexported fields
}

Config of package

func Flags

func Flags(fs *flag.FlagSet, prefix string) Config

Flags adds flags for configuring package

type Pinger added in v3.13.0

type Pinger = func() error

Pinger describes a function to check liveness of app

Jump to

Keyboard shortcuts

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