MCPcopy Index your code
hub / github.com/braintree/manners

github.com/braintree/manners @0.4.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.4.0 ↗ · + Follow
47 symbols 124 edges 5 files 18 documented · 38% 1 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Manners

A polite webserver for Go.

Manners allows you to shut your Go webserver down gracefully, without dropping any requests. It can act as a drop-in replacement for the standard library's http.ListenAndServe function:

func main() {
  handler := MyHTTPHandler()
  manners.ListenAndServe(":7000", handler)
}

Then, when you want to shut the server down:

manners.Close()

(Note that this does not block until all the requests are finished. Rather, the call to manners.ListenAndServe will stop blocking when all the requests are finished.)

Manners ensures that all requests are served by incrementing a WaitGroup when a request comes in and decrementing it when the request finishes.

If your request handler spawns Goroutines that are not guaranteed to finish with the request, you can ensure they are also completed with the StartRoutine and FinishRoutine functions on the server.

Compatability

Manners 0.3.0 and above uses standard library functionality introduced in Go 1.3.

Installation

go get github.com/braintree/manners

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

NewWithServer
called by 4
server.go
Serve
called by 4
server.go
Close
called by 2
server.go
ListenAndServeTLS
called by 2
server.go
StartRoutine
called by 2
server.go
FinishRoutine
called by 2
server.go
Add
called by 1
server.go
Done
called by 1
server.go

Shape

Function 21
Method 18
Struct 7
Interface 1

Languages

Go100%

Modules by API surface

helpers_test.go22 symbols
server.go12 symbols
server_test.go6 symbols
static.go4 symbols
transition_test.go3 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

For agents

$ claude mcp add manners \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page