gracehttp

package
v0.0.0-...-6e7aab7 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2015 License: BSD-3-Clause Imports: 13 Imported by: 2

Documentation

Overview

Package gracehttp provides easy to use graceful restart functionality for HTTP server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serve

func Serve(servers ...*http.Server) error

Serve will serve the given http.Servers and will monitor for signals allowing for graceful termination (SIGTERM) or restart (SIGUSR2).

func ServeWithWrapper

func ServeWithWrapper(wrapper ListenerWrapper, servers ...*http.Server) error

ServeWithWrapper is the same as Serve but the wrapper is used on all the underlying listeners

Types

type ListenerWrapper

type ListenerWrapper func(net.Listener) net.Listener

ListenerWrapper gets a net.Listener and returns a net.Listener

Jump to

Keyboard shortcuts

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