go-kit

module
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2017 License: MIT

README

Go kit Circle CI Travis CI GoDoc Coverage Status Go Report Card Sourcegraph

Go kit is a distributed programming toolkit for building microservices in large organizations. We solve common problems in distributed systems, so you can focus on your business logic.

Motivation

Go has emerged as the language of the server, but it remains underrepresented in large, consumer-focused tech companies like Facebook, Twitter, Netflix, and SoundCloud. These organizations have largely adopted 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 gb, glide, gvt, govendor, and vendetta. 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
jwt
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.
examples
addsvc
Package addsvc is an example microservice, useful for education.
Package addsvc is an example microservice, useful for education.
addsvc/client/grpc
Package grpc provides a gRPC client for the add service.
Package grpc provides a gRPC client for the add service.
addsvc/client/http
Package http provides an HTTP client for the add service.
Package http provides an HTTP client for the add service.
addsvc/client/thrift
Package thrift provides a Thrift client for the add service.
Package thrift provides a Thrift client for the add service.
addsvc/pb
Package pb is a generated protocol buffer package.
Package pb is a generated protocol buffer package.
profilesvc/client
Package client provides a profilesvc client based on a predefined Consul service name and relevant tags.
Package client provides a profilesvc client based on a predefined Consul service name and relevant tags.
shipping/booking
Package booking provides the use-case of booking a cargo.
Package booking provides the use-case of booking a cargo.
shipping/cargo
Package cargo contains the heart of the domain model.
Package cargo contains the heart of the domain model.
shipping/handling
Package handling provides the use-case for registering incidents.
Package handling provides the use-case for registering incidents.
shipping/inmem
Package inmem provides in-memory implementations of all the domain repositories.
Package inmem provides in-memory implementations of all the domain repositories.
shipping/inspection
Package inspection provides means to inspect cargos.
Package inspection provides means to inspect cargos.
shipping/location
Package location provides the Location aggregate.
Package location provides the Location aggregate.
shipping/routing
Package routing provides the routing domain service.
Package routing provides the routing domain service.
shipping/tracking
Package tracking provides the use-case of tracking a cargo.
Package tracking provides the use-case of tracking a cargo.
shipping/voyage
Package voyage provides the Voyage aggregate.
Package voyage provides the Voyage aggregate.
log
Package log provides a structured logger.
Package log provides a structured logger.
level
Package level implements leveled logging on top of package log.
Package level implements leveled logging on top of package log.
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.
dogstatsd
Package dogstatsd provides a DogStatsD backend for package metrics.
Package dogstatsd provides a DogStatsD backend for package metrics.
expvar
Package expvar provides expvar backends for metrics.
Package expvar provides expvar backends for metrics.
generic
Package generic implements generic versions of each of the metric types.
Package generic implements generic versions of each of the metric types.
graphite
Package graphite provides a Graphite backend for metrics.
Package graphite provides a Graphite backend for metrics.
influx
Package influx provides an InfluxDB implementation for metrics.
Package influx provides an InfluxDB implementation for metrics.
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.
pcp
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.
statsd
Package statsd provides a StatsD backend for package metrics.
Package statsd provides a StatsD backend for package metrics.
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.
consul
Package consul provides Instancer and Registrar implementations for Consul.
Package consul provides Instancer and Registrar implementations for Consul.
dnssrv
Package dnssrv provides an Instancer implementation for DNS SRV records.
Package dnssrv provides an Instancer implementation for DNS SRV records.
etcd
Package etcd provides an Instancer and Registrar implementation for etcd.
Package etcd provides an Instancer and Registrar implementation for etcd.
eureka
Package eureka provides Instancer and Registrar implementations for Netflix OSS's Eureka
Package eureka provides Instancer and Registrar implementations for Netflix OSS's Eureka
lb
Package lb implements the client-side load balancer pattern.
Package lb implements the client-side load balancer pattern.
zk
Package zk provides Instancer and Registrar implementations for ZooKeeper.
Package zk provides Instancer and Registrar implementations for ZooKeeper.
Package tracing provides helpers and bindings for distributed tracing.
Package tracing provides helpers and bindings for distributed tracing.
opentracing
Package opentracing provides Go kit integration to the OpenTracing project.
Package opentracing provides Go kit integration to the OpenTracing project.
Package transport contains bindings to concrete transports.
Package transport contains bindings to concrete transports.
grpc
Package grpc provides a gRPC binding for endpoints.
Package grpc provides a gRPC binding for endpoints.
grpc/_grpc_test/pb
Package pb is a generated protocol buffer package.
Package pb is a generated protocol buffer package.
http
Package http provides a general purpose HTTP binding for endpoints.
Package http provides a general purpose HTTP 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