url

package
v0.0.0-...-7922621 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checker

type Checker struct {
	URL     string
	Timeout time.Duration
}

Checker is a checker that check a given URL

func NewChecker

func NewChecker(url string) Checker

NewChecker returns a new url.Checker with the given URL

func NewCheckerWithTimeout

func NewCheckerWithTimeout(url string, timeout time.Duration) Checker

NewCheckerWithTimeout returns a new url.Checker with the given URL and given timeout

func (Checker) Check

func (u Checker) Check() health.Health

Check makes a HEAD request to the given URL If the request returns something different than StatusOK, The status is set to StatusBadRequest and the URL is considered Down

Jump to

Keyboard shortcuts

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