expvar

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

This package is a fork of the golang expvar expvar.Var types. Adding extra support for deleting and accessing raw typed values.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Float

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

Float is a 64-bit float variable that satisfies the expvar.Var interface.

func (*Float) Add

func (v *Float) Add(delta float64)

Add adds delta to v.

func (*Float) FloatValue

func (v *Float) FloatValue() float64

func (*Float) Set

func (v *Float) Set(value float64)

Set sets v to value.

func (*Float) String

func (v *Float) String() string

type FloatVar

type FloatVar interface {
	FloatValue() float64
}

type Int

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

Int is a 64-bit integer variable that satisfies the expvar.Var interface.

func (*Int) Add

func (v *Int) Add(delta int64)

func (*Int) IntValue

func (v *Int) IntValue() int64

func (*Int) Set

func (v *Int) Set(value int64)

func (*Int) String

func (v *Int) String() string

type IntFuncGauge added in v1.3.0

type IntFuncGauge struct {
	ValueF func() int64
}

IntFuncGauge is a 64-bit integer variable that satisfies the expvar.Var interface.

func NewIntFuncGauge added in v1.3.0

func NewIntFuncGauge(fn func() int64) *IntFuncGauge

func (*IntFuncGauge) Add added in v1.3.0

func (v *IntFuncGauge) Add(delta int64)

func (*IntFuncGauge) IntValue added in v1.3.0

func (v *IntFuncGauge) IntValue() int64

func (*IntFuncGauge) Set added in v1.3.0

func (v *IntFuncGauge) Set(value int64)

func (*IntFuncGauge) String added in v1.3.0

func (v *IntFuncGauge) String() string

type IntSum added in v1.1.0

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

IntSum is a 64-bit integer variable that consists of multiple different parts and satisfies the expvar.Var interface. The value of the var is the sum of all its parts. The part names are opaque and are simply used to identfy each part.

func NewIntSum added in v1.1.0

func NewIntSum() *IntSum

func (*IntSum) Add added in v1.1.0

func (v *IntSum) Add(part string, delta int64)

func (*IntSum) IntValue added in v1.1.0

func (v *IntSum) IntValue() int64

func (*IntSum) Set added in v1.1.0

func (v *IntSum) Set(part string, value int64)

func (*IntSum) String added in v1.1.0

func (v *IntSum) String() string

type IntVar

type IntVar interface {
	IntValue() int64
}

type Map

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

Map is a string-to-expvar.Var map variable that satisfies the expvar.Var interface.

func (*Map) Add

func (v *Map) Add(key string, delta int64)

func (*Map) AddFloat

func (v *Map) AddFloat(key string, delta float64)

AddFloat adds delta to the *Float value stored under the given map key.

func (*Map) Delete

func (v *Map) Delete(key string)

func (*Map) Do

func (v *Map) Do(f func(expvar.KeyValue))

Do calls f for each entry in the map. The map is locked during the iteration, but existing entries may be concurrently updated.

func (*Map) DoSorted added in v0.12.0

func (v *Map) DoSorted(f func(expvar.KeyValue))

DoSorted calls f for each entry in the map in sorted order. The map is locked during the iteration, but existing entries may be concurrently updated.

func (*Map) Get

func (v *Map) Get(key string) expvar.Var

func (*Map) Init

func (v *Map) Init() *Map

func (*Map) Set

func (v *Map) Set(key string, av expvar.Var)

func (*Map) String

func (v *Map) String() string

type String

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

String is a string variable, and satisfies the expvar.Var interface.

func (*String) Set

func (v *String) Set(value string)

func (*String) String

func (v *String) String() string

func (*String) StringValue

func (v *String) StringValue() string

type StringVar

type StringVar interface {
	StringValue() string
}

type UUID added in v1.3.0

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

UUID is a string variable that contain an UUID and satisfies the expvar.Var interface.

func (*UUID) Set added in v1.3.0

func (v *UUID) Set(value uuid.UUID)

func (*UUID) String added in v1.3.0

func (v *UUID) String() string

func (*UUID) StringValue added in v1.3.0

func (v *UUID) StringValue() string

func (*UUID) UUIDValue added in v1.3.0

func (v *UUID) UUIDValue() uuid.UUID

Jump to

Keyboard shortcuts

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