wf

command module
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2020 License: BSD-3-Clause Imports: 3 Imported by: 0

README

wf

latest doc ci cov qual

wf waits until TCP server(s) are ready to accept connections.

Why?

The main use case for wf is to make containerized applications that depend on external services more robust by waiting for those actual services to be ready, prior to application start. wf can wait on multiple TCP servers and is provided as a single, static binary for linux/amd64, so it can be added into the container and used as-is.

Usage

wf is provided as a command line application.

$ wf --help

Wait until TCP server(s) are ready to accept connections

Usage:
  wf [FLAGS] ADDRESS...

Flags:
  -t, --timeout duration     set wait timeout (default 5s)
  -f, --poll-freq duration   set connection poll frequency (default 500ms)
  -q, --quiet                suppress waiting messages
  -h, --help                 help for wf
      --version              version for wf

The functionalities themselves are provided as a Go library in the wait package. Refer to the relevant GoDoc documentation for a complete documentation.

Development

wf was developed using Go go1.13 on linux/amd64. Other versions and/or platforms may work but have not been tested.

# Clone the repository.
$ git clone https://github.com/bow/wf

# Run the tests.
$ make test

# Build the wf binary.
$ make wf

Credits

wf was inspired by the wait-for-it.sh script by @vishnubob.

Documentation

Overview

Package main exposes the https://godoc.org/github.com/bow/wf/wait package as the wf command line application.

The main use case for wf is to make containerized applications that depend on external services more robust by waiting for those actual services to be ready, prior to application start. It is provided as a single, static binary for linux-amd64, so it can be added into the container and used as-is.

Directories

Path Synopsis
Package cmd provides the command line interface for the https://godoc.org/github.com/bow/wf/wait package.
Package cmd provides the command line interface for the https://godoc.org/github.com/bow/wf/wait package.
Package wait is a library for waiting on events.
Package wait is a library for waiting on events.

Jump to

Keyboard shortcuts

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