http

package
v0.0.0-...-e7cb044 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2021 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContentType

func ContentType(next http.Handler) http.Handler

ContentType is a middleware setting the content type.

func IsBrokenPipe

func IsBrokenPipe(e error) bool

IsBrokenPipe checks if the error is a broken pipe error.

func ListenAndServe

func ListenAndServe(handler http.Handler, config Config) chan error

func NewRouter

func NewRouter() *chi.Mux

NewRouter returns chi router.

Types

type Config

type Config struct {
	Host     string
	Port     string
	CertFile string
	KeyFile  string
}

Config represents server configuration.

func (Config) Validate

func (cfg Config) Validate() error

Validate validates the server configuration.

Jump to

Keyboard shortcuts

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