monitor

package
v0.0.0-...-d002785 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2016 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package monitor provides an embedded HTTP server to expose metrics for monitoring

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Histogram

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

Histogram contains the data needed to properly export itself to expvar and provide a pretty printed version

func NewHistogram

func NewHistogram(name string, numBuckets int, growth float64, smallest float64,
	minValue int64) *Histogram

NewHistogram creates a new histogram and registers an HTTP handler for it. "name" must end with "Histogram", so that the "/debug/latency" handler can pretty print it.

func (*Histogram) String

func (h *Histogram) String() string

func (*Histogram) UpdateLatencyValues

func (h *Histogram) UpdateLatencyValues(t0, t1 time.Time)

UpdateLatencyValues updates the stats.Histogram's buckets with the new datapoint and updates the string associated with the expvar.String

type Server

type Server interface {
	Run()
}

Server represents a monitoring server

func NewServer

func NewServer(address string) Server

NewServer creates a new server struct

type Uint

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

Uint is a 64-bit unsigned integer variable that satisfies the Var interface.

func (*Uint) Add

func (v *Uint) Add(delta uint64)

Add delta

func (*Uint) Get

func (v *Uint) Get() uint64

Get the uint64 stored in the Uint

func (*Uint) Set

func (v *Uint) Set(value uint64)

Set value

func (*Uint) String

func (v *Uint) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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