From 1e3c507ae3421cd4d018f91a5d4319dd442bb07a Mon Sep 17 00:00:00 2001 From: John Bass Date: Thu, 15 Oct 2020 16:27:25 -0700 Subject: [PATCH] fleshed out the docs in preparation for a release --- CHANGELOG.md | 5 ++--- README.md | 22 ++++++++++++---------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d012a5..3a8cfd8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased] + +## [v0.1.0] - Busy server middleware for controlling http.Handler concurrency - Gate which allows shutoff of both client and server code - Immutable Header @@ -13,8 +15,5 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Error type that exposes HTTP metadata for rendering a response - Sonar integration -## [v0.1.0] -- Initial creation - [Unreleased]: https://github.com/xmidt-org/__PROJECT__/compare/v0.1.0..HEAD [v0.1.0]: https://github.com/xmidt-org/__PROJECT__/compare/0.0.0...v0.1.0 diff --git a/README.md b/README.md index 4b7d9d5..5146354 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # httpaux -httpaux does something good. +The missing functionality from `net/http` [![Build Status](https://travis-ci.com/xmidt-org/httpaux.svg?branch=main)](https://travis-ci.com/xmidt-org/httpaux) [![codecov.io](http://codecov.io/github/xmidt-org/httpaux/coverage.svg?branch=main)](http://codecov.io/github/xmidt-org/httpaux?branch=main) @@ -14,28 +14,30 @@ httpaux does something good. ## Summary -Search and replace httpaux with your project name. Summary should be a -small paragraph explanation of what this project does. +httpaux augments golang's `net/http` package with a few extra goodies: + +- `RoundTripperFunc` type that implements http.RoundTripper. This is an analog to http.HandlerFunc for clients. +- `Busy` server middleware that constrains the number of concurrent requests by consulting a `Limiter` strategy +- `ObservableWriter` which decorates the typical `http.ResponseWriter`, providing visibility into what handlers have written to the response. This type is intended to enable other middleware such as logging and metrics. +- `Gate` middleware for both servers and clients which can explicity shut off code. One typical use case for this is putting an application into maintenance mode. +- `Header` immutable data structure that is much more efficient in situations where the same set of headers are iterated over repeatedly. Useful when static headers need to be placed unconditionally on every request or response. +- `ConstantHandler` which returns a statically specified set of information in every response +- `Error` which can be used to wrap service and middleware errors in a form that makes rendering responses easier. This type is compatible with frameworks like `go-kit`. ## Table of Contents - [Code of Conduct](#code-of-conduct) -- [Details](#details) - [Install](#install) - [Contributing](#contributing) ## Code of Conduct -This project and everyone participating in it are governed by the [XMiDT Code Of Conduct](https://xmidt.io/code_of_conduct/). +This project and everyone participating in it are governed by the [XMiDT Code Of Conduct](https://xmidt.io/code_of_conduct/). By participating, you agree to this Code. -## Details - -Add details here. - ## Install -Add details here. +go get github.com/xmidt-org/httpaux ## Contributing