httpserver

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2022 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// ShutdownDelay is the time to wait for all request, go-routines etc complete
	ShutdownDelay = 10 // seconds
)

Variables

View Source
var (
	// ErrInvalidConfiguration indicates that parameters used to configure the service were invalid
	ErrInvalidConfiguration = errors.New("invalid configuration")
)

Functions

This section is empty.

Types

type RouterFunc

type RouterFunc func() *echo.Echo

RouterFunc creates a mux

type Server

type Server interface {
	StartBlocking()
	Stop()
}

Server is an interface for the HTTP server

func New

func New(router RouterFunc, shutdown ShutdownFunc, errorHandler echo.HTTPErrorHandler) (Server, error)

New returns a new HTTP server

type ShutdownFunc

type ShutdownFunc func(*echo.Echo)

ShutdownFunc is called before the server stops

Jump to

Keyboard shortcuts

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