httpstat

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2018 License: MIT, MIT Imports: 17 Imported by: 0

Documentation

Overview

Package httpstat provides http trace timings for requests. This implementation is based on https://github.com/davecheney/httpstat

Index

Constants

View Source
const (
	HTTPSTemplate = `` +
		`  DNS Lookup   TCP Connection   TLS Handshake   Server Processing   Content Transfer` + "\n" +
		`[%s  |     %s  |    %s  |        %s  |       %s  ]` + "\n" +
		`            |                |               |                   |                  |` + "\n" +
		`   namelookup:%s      |               |                   |                  |` + "\n" +
		`                       connect:%s     |                   |                  |` + "\n" +
		`                                   pretransfer:%s         |                  |` + "\n" +
		`                                                     starttransfer:%s        |` + "\n" +
		`                                                                                total:%s` + "\n"

	HTTPTemplate = `` +
		`   DNS Lookup   TCP Connection   Server Processing   Content Transfer` + "\n" +
		`[ %s  |     %s  |        %s  |       %s  ]` + "\n" +
		`             |                |                   |                  |` + "\n" +
		`    namelookup:%s      |                   |                  |` + "\n" +
		`                        connect:%s         |                  |` + "\n" +
		`                                      starttransfer:%s        |` + "\n" +
		`                                                                 total:%s` + "\n"
)

Define templates for rendering timings.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	Name    string
	W       io.Writer
	WErr    io.Writer
	AppName string
	// contains filtered or unexported fields
}

Command ...

func (*Command) Aliases

func (c *Command) Aliases() map[string]struct{}

Aliases are the aliases and name for the command. For instance a command can have a long form and short form.

func (*Command) Description

func (c *Command) Description() string

Description is what is printed in Usage.

func (*Command) Key

func (c *Command) Key() string

Key returns the commands name for sorting.

func (*Command) Run

func (c *Command) Run(args []string) (int, error)

Run ...

Jump to

Keyboard shortcuts

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