waitforit

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2020 License: MIT Imports: 9 Imported by: 0

README

Wait for a server is ready

Usage of waitforit:
  -h	display help
  -host value
    	hosts to wait
  -r int
    	number of retries for each host, negative for infinite retry (default 5)
  -t duration
    	time out for each connect (default 10s)
  -tt duration
    	total time out (default 1m0s)
  -w value
    	(alias of host) hosts to wait

Example:
  - Wait for two server using default config, return 0 when both of them can be connected
    waitforit -w tcp://localhost:9042 -w http://localhost:8080

TODO

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WaitSocket

func WaitSocket(u url.URL, timeout time.Duration) (time.Duration, error)

func WaitSockets

func WaitSockets(ctx context.Context, us []url.URL, totalTimeout time.Duration, timeout time.Duration, retry int) (time.Duration, error)

Types

This section is empty.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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