kit

module
v0.0.0-...-f3120f0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2016 License: MIT

README

Go kit Circle CI Drone.io Travis CI GoDoc Coverage Status Go Report Card

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 ★
  • h2, a microservices framework ★
  • gotalk, async peer communication protocol & library
  • Kite, a micro-service framework
  • gocircuit, dynamic cloud orchestration
Individual components
Web frameworks

Additional reading

Directories

Path Synopsis
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/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/repository
Package repository provides implementations of all the domain repositories.
Package repository provides implementations of all the domain repositories.
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.
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 implements a backend for package metrics that succeeds without doing anything.
Package discard implements a backend for package metrics that succeeds without doing anything.
dogstatsd
Package dogstatsd implements a DogStatsD backend for package metrics.
Package dogstatsd implements a DogStatsD backend for package metrics.
expvar
Package expvar implements an expvar backend for package metrics.
Package expvar implements an expvar backend for package metrics.
graphite
Package graphite implements a Graphite backend for package metrics.
Package graphite implements a Graphite backend for package metrics.
influxdb
Package influxdb implements a InfluxDB backend for package metrics.
Package influxdb implements a InfluxDB backend for package metrics.
prometheus
Package prometheus implements a Prometheus backend for package metrics.
Package prometheus implements a Prometheus backend for package metrics.
statsd
Package statsd implements a statsd backend for package metrics.
Package statsd implements a statsd backend for package metrics.
teststat
Package teststat contains helper functions for statistical testing of metrics implementations.
Package teststat contains helper functions for statistical testing of metrics implementations.
sd
Package sd provides utilities related to service discovery.
Package sd provides utilities related to service discovery.
consul
Package consul provides subscriber and registrar implementations for Consul.
Package consul provides subscriber and registrar implementations for Consul.
dnssrv
Package dnssrv provides a subscriber implementation for DNS SRV records.
Package dnssrv provides a subscriber implementation for DNS SRV records.
etcd
Package etcd provides a subscriber implementation for etcd.
Package etcd provides a subscriber implementation for etcd.
lb
Package lb implements the client-side load balancer pattern.
Package lb implements the client-side load balancer pattern.
zk
Package zk provides subscriber and registrar implementations for ZooKeeper.
Package zk provides subscriber 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.
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