server

package
v0.0.0-...-f0b74a6 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2017 License: MIT Imports: 10 Imported by: 1

Documentation

Overview

Package server handles the HTTP Server behavior

Package server handles the HTTP Server behavior

Package server handles the HTTP Server behavior

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultLogger

func DefaultLogger() *log.Logger

DefaultLogger creates a default Logger for the Application

func GracefulShutdown

func GracefulShutdown(app *http.Server, logger *log.Logger)

GracefulShutdown shutdowns gracefully the server using the Context Package

Types

type Server

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

Server encapsulates the Application Server and the Application Logger

func NewServer

func NewServer(logger *log.Logger) *Server

NewServer creates a new Application Server with the given Logger

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(res http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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