ping

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2016 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package ping tries to ping a HTTP server through different ways Connection, Session (Head), Get and Post

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Normalize

func Normalize(URL string) string

Normalize fixes scheme

Types

type Ping

type Ping struct {
	// contains filtered or unexported fields
}

Ping represents HTTP ping request

func NewPing

func NewPing(args string, cfg cli.Config) (*Ping, error)

NewPing validate and constructs request object

func (*Ping) Ping added in v0.2.3

func (p *Ping) Ping() (Result, error)

Ping tries to ping a web server through http

func (*Ping) Run

func (p *Ping) Run()

Run tries to ping w/ pretty print

type Result

type Result struct {
	StatusCode int
	ConnTime   float64
	TotalTime  float64
	Size       int
	Proto      string
	Server     string
	Status     string
}

Result holds Ping result

Jump to

Keyboard shortcuts

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