kit

module
v0.8.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2020 License: MIT

README

Go kit Circle CI Travis CI 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.

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 a library, designed to be imported into a binary package. Vendoring is currently the best way for binary package authors to ensure reliable, reproducible builds. Therefore, we strongly recommend our users use vendoring for all of their dependencies, including Go kit. To avoid compatibility and availability issues, Go kit doesn't vendor its own dependencies, and doesn't recommend use of third-party import proxies.

There are several tools which make vendoring easier, including dep, gb, glide, gvt, and govendor. In addition, Go kit uses a variety of continuous integration providers to find and fix compatibility problems as soon as they occur.

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


Development supported by DigitalOcean.

Directories

Path Synopsis
auth
Package circuitbreaker implements the circuit breaker pattern.
Package circuitbreaker implements the circuit breaker pattern.
Package endpoint defines an abstraction for RPCs.
Package endpoint defines an abstraction for RPCs.
log
Package log provides a structured logger.
Package log provides a structured logger.
level
Package level implements leveled logging on top of Go kit's log package.
Package level implements leveled logging on top of Go kit's log package.
term
Package term provides tools for logging to a terminal.
Package term provides tools for logging to a terminal.
Package metrics provides a framework for application instrumentation.
Package metrics provides a framework for application instrumentation.
discard
Package discard provides a no-op metrics backend.
Package discard provides a no-op metrics backend.
internal/convert
Package convert provides a way to use Counters, Histograms, or Gauges as one of the other types
Package convert provides a way to use Counters, Histograms, or Gauges as one of the other types
internal/ratemap
Package ratemap implements a goroutine-safe map of string to float64.
Package ratemap implements a goroutine-safe map of string to float64.
multi
Package multi provides adapters that send observations to multiple metrics simultaneously.
Package multi provides adapters that send observations to multiple metrics simultaneously.
prometheus
Package prometheus provides Prometheus implementations for metrics.
Package prometheus provides Prometheus implementations for metrics.
provider
Package provider provides a factory-like abstraction for metrics backends.
Package provider provides a factory-like abstraction for metrics backends.
teststat
Package teststat provides helpers for testing metrics backends.
Package teststat provides helpers for testing metrics backends.
sd
Package sd provides utilities related to service discovery.
Package sd provides utilities related to service discovery.
dnssrv
Package dnssrv provides an Instancer implementation for DNS SRV records.
Package dnssrv provides an Instancer implementation for DNS SRV records.
lb
Package lb implements the client-side load balancer pattern.
Package lb implements the client-side load balancer pattern.
Package tracing provides helpers and bindings for distributed tracing.
Package tracing provides helpers and bindings for distributed tracing.
opencensus
Package opencensus provides Go kit integration to the OpenCensus project.
Package opencensus provides Go kit integration to the OpenCensus project.
Package transport contains bindings to concrete transports.
Package transport contains bindings to concrete transports.
amqp
Package amqp implements an AMQP transport.
Package amqp implements an AMQP transport.
grpc
Package grpc provides a gRPC binding for endpoints.
Package grpc provides a gRPC binding for endpoints.
http
Package http provides a general purpose HTTP binding for endpoints.
Package http provides a general purpose HTTP binding for endpoints.
http/jsonrpc
Package jsonrpc provides a JSON RPC (v2.0) binding for endpoints.
Package jsonrpc provides a JSON RPC (v2.0) binding for endpoints.
httprp
Package httprp provides an HTTP reverse-proxy transport.
Package httprp provides an HTTP reverse-proxy transport.
util
conn
Package conn provides utilities related to connections.
Package conn provides utilities related to connections.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL