Go kit

一个微服务的标准库。「A standard library for microservices.」

Github stars Tracking Chart

Go kit

Go Kit 是一个用于在 Go 中构建微服务器(或优雅的单块)的编程工具包。 Go Kit 解决分布式系统和应用程序架构中的常见问题,因此您可以专注于交付业务价值。

动机

Go 已经成为服务器的语言,但在 Facebook、Twitter、Netflix 和 SoundCloud 等所谓的“现代企业”公司中,它的市场份额仍然很低。这些组织中的许多已经将业务逻辑转向基于 JVM 的堆栈,这在很大程度上归功于直接支持它们的微服务体系结构的库和生态系统。

要达到更高的成功水平,Go 需要的不仅仅是简单的原语和习惯用法。它需要一个全面的工具包,用于大规模的一致分布式编程。Go kit 是一组包和最佳实践,为任何规模的组织提供了全面、健壮和可靠的方法来构建微服务。

有关详细信息, 请参阅 网站激励人心的博客文章演讲视频。 另请参阅 GopherCon 2015上的Go kit talk

Go kit 是 Go(golang)软件包(库)的集合,可帮助您构建强大、可靠、可维护的微服务器。 它最初被认为是帮助更大(所谓的现代企业)组织采用 Go 作为实现语言的工具包。 但它很快就“向下增长”,现在也为小型创业公司和组织服务。 有关 Go 套件的起源的更多信息,请参阅 Go Kit:进入现代企业

目标

  • 在异构 SOA 中运行 -- 期望与大多数非 Go-kit 服务进行交互
  • RPC 作为主要消息传递模式
  • 可插入的序列化和传输 -- 不仅仅是基于 HTTP 的 JSON
  • 在现有基础设施内运营 -- 不需要特定工具或技术

非目标

  • 支持除 RPC 之外的消息传递模式(现在) -- 例如 MPI,pub/sub,CQRS 等
  • 重新实现可以通过调整现有软件提供的功能
  • 对业务关注事项(部署、配置、流程监督、编制等)有意见。

为什么要使用 Go 套件?

如果您想要在组织中采用微型服务模式,则应使用 Go kit。 Go 工具包将帮助您构建和构建您的服务,避免常见的陷阱,并编写与 grace 一起增长的代码。

Go 工具还可以帮助 Go 成为一个实施语言,为工程经理或技术主管等利益相关者辩护。 Go Kit 过提供成熟的模式和成语来避免 Go 和微服务的风险,由一大群有经验的贡献者撰写和维护,并在生产环境中验证。

谁是幕后功臣?

Go 工具箱最初是由 Peter Bourgon 设计的,但现在由来自不同背景和组织的大量贡献者构建和维护。 Go kit 目前是一项全志愿服务,没有商业支持。

相关项目

带有★的项目对Go套件的设计有特别的影响(反之亦然)。

服务框架

  • Gizmo,来自纽约时报的微服务工具包★
  • go-micro,一个微服务客户端/服务器库★
  • gotalk,异步对等通信协议和库
  • Kite,一种微服务框架
  • gocircuit,动态云编排

个别组件

  • afex/hystrix-go,客户端延迟和容错库
  • armon/go-metrics,用于将性能和运行时指标导出到外部度量系统的库
  • codahale/lunk,采用 Google Dapper 或 Twitter 的 Zipkin 风格的结构化日志
  • eapache/go-resiliency,弹性模式
  • sasbury/logging,标记的日志记录样式
  • grpc/grpc-go,基于 HTTP/2 的RPC
  • inconshreveable/log15,Go★简单,强大的日志记录
  • mailgun/vulcand,由 etcd 支持的程序化负载均衡器
  • mattheath/phosphor,分布式系统跟踪
  • pivotal-golang/lager,一个固定的记录库
  • rubyist/circuitbreaker,断路器库
  • sirupsen/logrus,Go★的结构化,可插入的日志记录
  • sourcegraph/appdash,基于 Google Dapper 的应用程序跟踪系统
  • spacemonkeygo/monitor,数据收集,监控,检测和 Zipkin 客户端库
  • streadway/handy,net/http 处理程序过滤器
  • vitess/rpcplus,包 rpc + context.Context
  • gdamore/mangos,pure Go 中的 nanomsg 实现

Web 框架

辅助读物

开发支持 DigitalOcean

vz 修订于 2019/07/27

vz 第二次修订于 2019/09/07

Overview

Name With Ownergo-kit/kit
Primary LanguageGo
Program languageGo (Language Count: 2)
PlatformDocker, Heroku, Kubernetes, Linux, Mac, Windows, Mesos, Marathon, DC/OS
License:MIT License
Release Count13
Last Release Namev0.13.0 (Posted on )
First Release Namev0.1.0 (Posted on )
Created At2015-02-03 00:01:19
Pushed At2024-04-14 03:06:49
Last Commit At2024-03-13 14:42:15
Stargazers Count26.1k
Watchers Count678
Fork Count2.4k
Commits Count1.5k
Has Issues Enabled
Issues Count561
Issue Open Count36
Pull Requests Count479
Pull Requests Open Count12
Pull Requests Close Count167
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private

Go kitCircle CI Travis CI builds.sr.ht status GoDoc Coverage Status Go Report Card Sourcegraph

Go kit is a programming toolkit for building microservices
(or elegant monoliths) in Go. We solve common problems in distributed
systems and application architecture so you can focus on delivering
business value.

Sponsors

Click on Sponsor, above, for more information on sponsorship.

Motivation

Go has emerged as the language of the server, but it remains underrepresented
in so-called "modern enterprise" companies like Facebook, Twitter, Netflix, and
SoundCloud. Many of these organizations have turned to JVM-based stacks for
their business logic, owing in large part to libraries and ecosystems that
directly support their microservice architectures.

To reach its next level of success, Go needs more than simple primitives and
idioms. It needs a comprehensive toolkit, for coherent distributed programming
in the large. Go kit is a set of packages and best practices, which provide a
comprehensive, robust, and trustable way of building microservices for
organizations of any size.

For more details, see
the website,
the motivating blog post and
the video of the talk.
See also the
Go kit talk at GopherCon 2015.

Goals

  • Operate in a heterogeneous SOA — expect to interact with mostly non-Go-kit services
  • RPC as the primary messaging pattern
  • Pluggable serialization and transport — not just JSON over HTTP
  • Operate within existing infrastructures — no mandates for specific tools or technologies

Non-goals

  • Supporting messaging patterns other than RPC (for now) — e.g. MPI, pub/sub, CQRS, etc.
  • Re-implementing functionality that can be provided by adapting existing software
  • Having opinions on operational concerns: deployment, configuration, process supervision, orchestration, etc.

Contributing

Please see CONTRIBUTING.md.
Thank you, contributors!

Dependency management

Go kit is modules aware, and we
encourage users to use the standard modules tooling. But Go kit is at major
version 0, so it should be compatible with non-modules environments.

Projects with a ★ have had particular influence on Go kit's design (or vice-versa).

Service frameworks

  • gizmo, a microservice toolkit from The New York Times ★
  • go-micro, a microservices client/server library ★
  • gotalk, async peer communication protocol & library
  • Kite, a micro-service framework
  • gocircuit, dynamic cloud orchestration

Individual components

Web frameworks

Additional reading

To the top