Skip to content

An interface for establishing blockers in code

License

Notifications You must be signed in to change notification settings

gomicro/blockit

Repository files navigation

Blockit

GitHub Workflow Status (branch) Go Reportcard go.dev reference License Release

Blockit provides an interface for establishing blockers where you do not wish to proceed until a certain number of tasks are done. Each of the defined blockers can then be fed into a Multiblocker that will wait for all of them to be finished before proceeding.

Primary Use Case

The reason this library exists is to allow for configuration of a service to proceed all the way to the point of standing up a status endpoint. It is intended to allow the service to configure itself asynchronously of its dependencies and not report healthy until those dependencies are all met. This is particularly useful with Docker and having the service start before its database, telemetry infrastructure, and logging infrastructure are in place.

Installation

go get github.com/gomicro/blockit

Usage

See the examples within the docs for ways to use the library.

Versioning

The library will be versioned in accordance with Semver 2.0.0. See the releases section for the latest version. Until version 1.0.0 the libary is considered to be unstable.

It is always highly recommended to vendor the version you are using.

License

See LICENSE.md for more information.