Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Packages

Table of contents

  1. Core
    1. Config
  2. Log
  3. Interceptors
  4. Errors
    1. Notifier
  5. Tracing
  6. Hystrix Prometheus
  7. grpcpool
  8. Data Builder

Core

The core module is the base module and provides the base implementation for ColdBrew. It works in conjunction with the other modules to provide the full functionality of Cold Brew.

Documentation can be found at core-docs

Config

Coldbrew config package contains the configuration for the core package. It uses [envconfig] to load the configuration from the environment variables.

Documentation can be found at config-docs

Log

log provides a minimal interface for structured logging in services. It provides a simple interface to log errors, warnings, info and debug messages. It also provides a mechanism to add contextual information to logs. We provide implementations for gokit, logrus and zap.

Documentation can be found at log-docs

Interceptors

Interceptors provides a common set of reusable interceptors for grpc services

Documentation can be found at interceptor-docs

Errors

errors provides an implementation of golang error with stack strace information attached to it, the error objects created by this package are compatible with https://golang.org/pkg/errors/

Documentation can be found at errors-docs

Notifier

notifier provides notifier services for error reporting (airbrake, bugsnag, rollbar, sentry). Notifier replies on Errors package to get the stack trace information.

Documentation can be found at notifier-docs

Tracing

Tracing is a library that provides distributed tracing to Go applications. It offers features such as collecting performance data of an application, identifying where requests are spending most of their time, and segmenting requests. It supports exporting traces to 3rd-party services such as Jaeger, Zipkin, Opentelemetry, and NewRelic.

Documentation can be found at tracing-docs

Hystrix Prometheus

hystrixprometheus provides a Prometheus metrics collector for Hystrix (https://github.com/afex/hystrix-go). This is a workaround for hystrix-go not supporting the prometheus registry

Documentation can be found at hystrixprometheus-docs

grpcpool

grpcpool is a pool of grpc.ClientConns that can be used to make requests to a grpc server. It implements grpc.ClientConnInterface to enable it to be used directly with generated proto stubs.

Documentation can be found at grpcpool-docs

Data Builder

Data builder is a library to compile and execute data-processing logic. Users can express any data-processing logic as functions that accept and return structs. Based on these struct types, the library is able to resolve dependencies at compile time to catch issues with the computation graph (such as missing inputs, missing data-builder functions, cyclic dependencies). Compilation infers a sequence in which the data-processing functions can be run (and can support parallel execution). Any App that acts on a request, processes it in multiple steps, and returns some data that depends on these steps could be written using data-builder.

Documentation can be found at data-builder-docs