百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
T

typhon

> 编程语言
开源

这是一个围绕 Go 的 net/http 进行封装,以提供安全性和便利性。在 Monzo,Typhon 成为我们微服务平台中的大多数客户端和服务器的基础。

786 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

这是一个围绕 Go 的 net/http 进行封装,以提供安全性和便利性。在 Monzo,Typhon 成为我们微服务平台中的大多数客户端和服务器的基础。

Typhon

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.

It provides a number of conveniences and tries to promote safety wherever possible. Here's a short list of interesting features in Typhon:

  • No need to close body.Close() in clients
    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.

  • Middleware "filters"
    Filters are decorators around Services; in Typhon servers and clients share common functionality by composing it functionally.

  • Body encoding and decoding
    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.

  • Propagation of cancellation
    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.

  • Error propagation
    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.

  • Full HTTP/1.1 and HTTP/2.0 support
    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.

Issues· 8 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Gogogolanghttpmicroservices

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言