Typhon is a wrapper around Go's net/http library that we use at Monzo to build RPC servers and clients in our microservices platform. A wrapper around Go's net/http to provide safety and convenience. At Monzo, Typhon forms the basis of most clients and servers in our microservices platform. Forgetting to body.Close() in a client when the body has been dealt with is a common source of resource leaks in Go programs in our experience. Typhon ensures that – unless you're doing something really weird with the body – it will be closed automatically. Marshalling and unmarshalling request bodies to structs is such a common operation that our Request and Response objects support them directly. If the operations fail, the errors are propagated automatically since that's nearly always what a server will want.
Features
- No need to close body.Close() in clients
- Middleware "filters"
- Body encoding and decoding
- Propagation of cancellation
- Error propagation
- Full HTTP/1.1 and HTTP/2.0 support