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.
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.
go get github.com/gomicro/blockit
See the examples within the docs for ways to use the library.
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.
See LICENSE.md for more information.