wfi

package module
v0.0.0-...-6bde951 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

README

WFI (wait-for-it)

Simple Go library to wait for things!

Use case

  • Create reliable testing environment using docker-compose and wait for the components to start up.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Down

func Down(execLoc, fileName string)

Down cleans up services with docker-compose using `down` command

func Find

func Find(phrase string, r io.Reader, duration time.Duration) (string, error)

Find parses from reader line by line to determine whether the given phrase exists. Currently there is no support for regex and the logic is built on top of `strings.Contains()` function

func Ping

func Ping(host string, duration time.Duration) error

Ping it

func Up

func Up(execLoc, fileName string, options ...string) error

Up spins up docker-compose using `up` command

func UpWithLogs

func UpWithLogs(execLoc, fileName string, options ...string) (io.ReadCloser, error)

UpWithLogs spins up docker-compose using `up` command but not in detach mode One should never pass in "-d" as option because it will display logs

Types

This section is empty.

Jump to

Keyboard shortcuts

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