waitforserver

package
v0.0.0-...-8b1022e Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2016 License: Apache-2.0, Apache-2.0 Imports: 3 Imported by: 0

README

waitforserver Travis CI Status Coverage Status GoDoc

package waitforserver provides a function to wait for a server at given address.

Documentation

Overview

package waitforserver provides a function to wait for a server at given address.

Typical usage:

  import (
    "time"

    . "github.com/getlantern/waitforserver"
  )

  func doStuff() {
    // start a server at localhost:5234
    if err := WaitForServer("tcp", "localhost:5234", 10 * time.Second); err != nil {
      // handle failure
    }
  }
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WaitForServer

func WaitForServer(protocol string, addr string, limit time.Duration) error

WaitForServer waits for a TCP server to start at the given address, waiting up to the given limit and reporting an error if the server didn't start within the time limit.

Types

This section is empty.

Jump to

Keyboard shortcuts

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