http

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package http is responsible for creating an HTTP server

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server is an http.Server and its listener

func NewHTTPServer

func NewHTTPServer(address string, router http.Handler, logger log.Logger) (*Server, error)

NewHTTPServer starts a logged http server on the given address

func (*Server) Port

func (srv *Server) Port() int

Port of the listener

func (*Server) Shutdown added in v0.4.0

func (srv *Server) Shutdown(ctx context.Context) error

Shutdown will close the listener and the shutdown http server

Directories

Path Synopsis
Package middleware contains general-purpose HTTP handlers
Package middleware contains general-purpose HTTP handlers
Package sessions is wrapper around github.com/gorilla/sessions.
Package sessions is wrapper around github.com/gorilla/sessions.

Jump to

Keyboard shortcuts

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