pkg

module
v0.0.0-...-2b7dcb4 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: BSD-2-Clause

README

remind101/pkg CircleCI GoDoc

package pkg is a collection of Go packages that provide a layer of convenience over the stdlib.

Packages

client

Helps build http clients with standard functionality such as error handling, tracing, timeouts, request signatures, json encoding and decoding, etc.

counting

Implements an a linear-time counting algorithm, also known as "linear counting".

httpmock

A simple mock server implementation, useful for mocking external services in tests.

httpx

Defines the httpx.Handler interface, an httpx.Handler router, and a variety of middleware.

logger

Defines a context aware structured leveled logger.

metrics

Defines an interface for metrics, with an implementation for Datadog.

reporter

Defines an interface for error reporting, with implementations for honeybadger, newrelic, and rollbar.

retry

Provides the ability to retry a function call with exponential backoff and notification hooks.

stream

Provides types that make it easier to perform streaming IO.

svc

Provides tooling that integrates with all of the above packages to build http servers with logging, distributed tracing, error reporting and metrics out of the box.

timex

Use instead of time.Now to allow easy stubbing in tests.

profiling

Lightweight convenience stuff around pprof and Google Cloud Profiler for visibility into all our apps.

Usage

For examples of usage, see the example directory.

Directories

Path Synopsis
package client provides functionality for building HTTP clients.
package client provides functionality for building HTTP clients.
package httpx provides an extra layer of convenience over package http.
package httpx provides an extra layer of convenience over package http.
errors
package errors provides error handling primitives in a request context.
package errors provides error handling primitives in a request context.
package logger is a package that provides a structured logger that's context.Context aware.
package logger is a package that provides a structured logger that's context.Context aware.
package reporter provides a context.Context aware abstraction for shuttling errors and panics to third partys.
package reporter provides a context.Context aware abstraction for shuttling errors and panics to third partys.
hb2
package hb2 is a Go package for sending errors to Honeybadger using the official client library
package hb2 is a Go package for sending errors to Honeybadger using the official client library
nr
Package stream provides types that make it easier to perform streaming io.
Package stream provides types that make it easier to perform streaming io.
http
Package http provides streaming implementations of various net/http types.
Package http provides streaming implementations of various net/http types.
Package svc provides some tooling to make building services with remind101/pkg easier.
Package svc provides some tooling to make building services with remind101/pkg easier.
tracing
contrib/redigo/redis
COPIED from https://github.com/DataDog/dd-trace-go/tree/master/contrib/garyburd/redigo and modified to use opentracing.
COPIED from https://github.com/DataDog/dd-trace-go/tree/master/contrib/garyburd/redigo and modified to use opentracing.

Jump to

Keyboard shortcuts

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