http

package
v0.0.0-...-348cdae Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultHandler

func DefaultHandler() http.Handler

DefaultHandler returns a simple request handler that replies to each request with an info page.

Types

type Server

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

Server provides methods to run an HTTP server with custom handlers.

func NewServer

func NewServer(addr string) *Server

NewServer creates a Server.

func (*Server) AddHandler

func (s *Server) AddHandler(route string, handler http.Handler)

AddHandler adds an HTTP Handler for a given route.

func (*Server) ListenAndServe

func (s *Server) ListenAndServe()

ListenAndServe is running the HTTP Server.

func (*Server) Shutdown

func (s *Server) Shutdown()

Shutdown the HTTP Server.

Jump to

Keyboard shortcuts

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