golib

module
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2020 License: GPL-3.0

README

golib

An extremely opinionated set of modules

go.dev reference

🧐 Motivation

When kicking off a new project, often times engineers decide not to care about consistency, debuggability and other little details that are not completely necessary to "deliver". This set of modules provide exactly that: a way to keep things consistent without getting in your way.

At the same time, it provides an opinionated way on how certain elements should look like. Examples are the errors or logger packages, which expose a simpler interface from what we're used to.

👩‍💻 Provided modules

The cntxt package lets you interact with known attributes that are required to keep in a context.

The errors package lets you create contextual errors using a simplified contract.

The halt package lets you handle graceful shutdowns.

The kv package lets you define key-value pairs to be used in multiple situations.

The logger package lets you log as you'd normally do, only a simplified contract is used.

The o11y package provides an abstraction to make a program observable.

The pubsub package lets you publish and subscribe to messages.

🥺 Missing packages

Existing packages are subject to change. Semantic versioning is used, backwards compatibility will be kept.

Directories

Path Synopsis
Package cntxt provides a way to access known context values.
Package cntxt provides a way to access known context values.
Package errors provides a way to generate contextual errors.
Package errors provides a way to generate contextual errors.
Package halt exposes a convenience method to deal with graceful shutdowns.
Package halt exposes a convenience method to deal with graceful shutdowns.
Package kv provides a way to work with keys and values.
Package kv provides a way to work with keys and values.
Package logger provides a simplified logger to write log lines into a writer.
Package logger provides a simplified logger to write log lines into a writer.
memory
Package memory is a io.Writer implementation to use when testing log lines being produced.
Package memory is a io.Writer implementation to use when testing log lines being produced.
Package o11y provides an abstraction to make system observable.
Package o11y provides an abstraction to make system observable.
memory
Package memory provides an agent implementation to use when testing observability elements.
Package memory provides an agent implementation to use when testing observability elements.
Package pubsub is an abstraction of any publisher-subscriber mechanism.
Package pubsub is an abstraction of any publisher-subscriber mechanism.

Jump to

Keyboard shortcuts

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