documentation

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 13, 2014 License: BSD-2-Clause Imports: 0 Imported by: 0

README

Handy Handlers

Collection of useful HTTP handlers that form a handler stack of filters. Many are opinionated for a specific purpose.

API

The signature for a handler wrapper ends with an http.Handler interface and returns a http.Handler interface. For example:

func Log(w io.Writer, http.Handler) http.Handler

func CORS(methods, origins []string, http.Handler) http.Handler

Contributing

Fork the repo and add your fix or handler with tests. Make a pull request.

License

Copyright (c) 2013, SoundCloud Ltd. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Documentation

Overview

Package handy organizes some useful http server handler filters or handlers for reuse.

Directories

Path Synopsis
Package breaker implements a circuit breaker with configurable failure thresholds.
Package breaker implements a circuit breaker with configurable failure thresholds.
Package cors contains filters to handle CORS related requests defined from http://www.w3.org/TR/cors/
Package cors contains filters to handle CORS related requests defined from http://www.w3.org/TR/cors/
Package encoding contains Content-Encoding related filters.
Package encoding contains Content-Encoding related filters.
Package proxy contains a proxying HTTP transport.
Package proxy contains a proxying HTTP transport.
Package redirect contains filters to handle HTTP and HTTPS redirects
Package redirect contains filters to handle HTTP and HTTPS redirects
Package report organizes textual reporting from the HTTP context.
Package report organizes textual reporting from the HTTP context.
Package rewrite contains filters to handle HTTP rewrites
Package rewrite contains filters to handle HTTP rewrites
Package statsd collects and reports telemetry from http handlers.
Package statsd collects and reports telemetry from http handlers.

Jump to

Keyboard shortcuts

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