{"id":13711353,"url":"https://github.com/monzo/typhon","last_synced_at":"2025-05-14T05:10:44.098Z","repository":{"id":27226098,"uuid":"30697332","full_name":"monzo/typhon","owner":"monzo","description":"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.","archived":false,"fork":false,"pushed_at":"2025-01-31T07:53:03.000Z","size":4513,"stargazers_count":767,"open_issues_count":9,"forks_count":60,"subscribers_count":112,"default_branch":"master","last_synced_at":"2025-04-11T00:05:04.338Z","etag":null,"topics":["go","golang","http","microservices","rpc"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"cucumber/cucumber","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/monzo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-02-12T10:21:42.000Z","updated_at":"2025-04-10T14:39:10.000Z","dependencies_parsed_at":"2024-06-18T13:38:00.784Z","dependency_job_id":"00d52af2-ecbc-45c1-809d-3a0ac32a1348","html_url":"https://github.com/monzo/typhon","commit_stats":{"total_commits":574,"total_committers":36,"mean_commits":"15.944444444444445","dds":0.6707317073170731,"last_synced_commit":"ab6ccb716c2c01ba071ee3c4ddae79f46eb47651"},"previous_names":["b2aio/typhon","vinceprignano/bunny"],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monzo%2Ftyphon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monzo%2Ftyphon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monzo%2Ftyphon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monzo%2Ftyphon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/monzo","download_url":"https://codeload.github.com/monzo/typhon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254076850,"owners_count":22010611,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","http","microservices","rpc"],"created_at":"2024-08-02T23:01:07.321Z","updated_at":"2025-05-14T05:10:44.073Z","avatar_url":"https://github.com/monzo.png","language":"Go","readme":"# Typhon 🐲\n\n[![Build Status](https://travis-ci.org/monzo/typhon.svg?branch=master)](https://travis-ci.org/monzo/typhon)\n[![GoDoc](https://godoc.org/github.com/monzo/typhon?status.svg)](https://godoc.org/github.com/monzo/typhon)\n\nTyphon is a wrapper around Go's [`net/http`] library that we use at Monzo to build RPC servers and clients in [our microservices platform][platform blog post].\n\nIt provides a number of conveniences and tries to promote safety wherever possible. Here's a short list of interesting features in Typhon:\n\n* **No need to close `body.Close()` in clients**  \n  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.\n\n* **Middleware \"filters\"**  \n  Filters are decorators around `Service`s; in Typhon servers and clients share common functionality by composing it functionally.\n\n* **Body encoding and decoding**  \n  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.\n\n* **Propagation of cancellation**  \n  When a server has done handling a request, the request's context is automatically cancelled, and these cancellations are propagated through the distributed call stack. This lets downstream servers conserve work producing responses that are no longer needed.\n\n* **Error propagation**  \n  Responses have an inbuilt `Error` attribute, and serialisation/deserialisation of these errors into HTTP errors is taken care of automatically. We recommend using this in conjunction with [`monzo/terrors`].\n\n* **Full HTTP/1.1 and HTTP/2.0 support**  \n  Applications implemented using Typhon can communicate over HTTP/1.1 or HTTP/2.0. Typhon has support for full duplex communication under HTTP/2.0, and [`h2c`] (HTTP/2.0 over TCP, ie. without TLS) is also supported if required.\n\n[`net/http`]: https://golang.org/pkg/net/http/\n[platform blog post]: https://monzo.com/blog/2016/09/19/building-a-modern-bank-backend/\n[`monzo/terrors`]: http://github.com/monzo/terrors\n[`h2c`]: https://httpwg.org/specs/rfc7540.html#discover-http\n","funding_links":[],"categories":["Repositories","Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonzo%2Ftyphon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmonzo%2Ftyphon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonzo%2Ftyphon/lists"}