probetcp

command module
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2019 License: MIT Imports: 7 Imported by: 0

README

tcpwait

Wait for TCP endpoints to be reachable (e.g. wait for a database in a Docker container).

version build status license

Usage

tcpwait waits for TCP endpoints to be reachable.

Usage:
  tcpwait [OPTION...] ENDPOINT

Options:
  -i, --interval int   Time to wait between retries in milliseconds (default 1000)
  -q, --quiet          Do not print anything (default false)
  -r, --retries int    Number of times to retry to reach the endpoint if it fails (default 0)
  -t, --timeout int    TCP connection timeout in milliseconds (default 60000)

Examples:
  Wait for a website:
    tcpwait google.com:80
  Wait for a MySQL database (10 attempts every 2 seconds):
    tcpwait -r 9 -i 2000 tcp://localhost:3306

Installation

With Homebrew:

brew install alphahydrae/tools/tcpwait
Download binary
  • Linux

    wget -O /usr/local/bin/tcpwait \
      https://github.com/AlphaHydrae/tcpwait/releases/download/v2.0.0/tcpwait_v2.0.0_linux_amd64 && \
      chmod +x /usr/local/bin/tcpwait
    
  • Linux (arm64)

    wget -O /usr/local/bin/tcpwait \
      https://github.com/AlphaHydrae/tcpwait/releases/download/v2.0.0/tcpwait_v2.0.0_linux_arm64 && \
      chmod +x /usr/local/bin/tcpwait
    
  • macOS

    wget -O /usr/local/bin/tcpwait \
      https://github.com/AlphaHydrae/tcpwait/releases/download/v2.0.0/tcpwait_v2.0.0_darwin_amd64 && \
      chmod +x /usr/local/bin/tcpwait
    
  • Windows

    wget -O /usr/local/bin/tcpwait \
      https://github.com/AlphaHydrae/tcpwait/releases/download/v2.0.0/tcpwait_v2.0.0_windows_amd64 && \
      chmod +x /usr/local/bin/tcpwait
    

Documentation

Overview

The tcpwait command checks whether a TCP endpoint can be reached.

Directories

Path Synopsis
Package tcp provides the WaitTCPEndpoint function to wait until a TCP endpoint can be reached.
Package tcp provides the WaitTCPEndpoint function to wait until a TCP endpoint can be reached.

Jump to

Keyboard shortcuts

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