httpcheck

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dimensions

type Dimensions struct {
	Map map[string]string
}

func NewDimension

func NewDimension() Dimensions

func NewPreDimension

func NewPreDimension(dim map[string]string) Dimensions

func (*Dimensions) Add

func (d *Dimensions) Add(key, val string)

func (*Dimensions) String

func (d *Dimensions) String() string

type Health

type Health struct {
	Name   string
	Status int
	Time   time.Time
}

func NewHealth

func NewHealth(n string, s int) Health

type Httpd

type Httpd struct {
	Cfg     *config.Config
	Version string
	AppName string
	Metrics map[string]Metric
}

func NewHttpd

func NewHttpd() Httpd

func (*Httpd) AssembleLogLines added in v1.1.0

func (h *Httpd) AssembleLogLines(r *http.Request, ep string, start time.Time, dim Dimensions) (res []string)

func (*Httpd) ComputePi added in v1.1.0

func (h *Httpd) ComputePi(w http.ResponseWriter, r *http.Request)

func (*Httpd) Index added in v1.1.0

func (h *Httpd) Index(w http.ResponseWriter, r *http.Request)

func (*Httpd) LoqRequest added in v1.1.0

func (h *Httpd) LoqRequest(r *http.Request, ep string, start time.Time, dim Dimensions)

func (*Httpd) Run

func (h *Httpd) Run(ctx *cli.Context)

func (*Httpd) ShowHealth added in v1.1.0

func (h *Httpd) ShowHealth(w http.ResponseWriter, r *http.Request)

type Metric

type Metric struct {
	Cnt      float64
	ClientIP string
}

func NewMetric

func NewMetric(ip string) Metric

func (*Metric) Increment

func (m *Metric) Increment()

Jump to

Keyboard shortcuts

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