expvar

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2016 License: MIT Imports: 8 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 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
}

Jump to

Keyboard shortcuts

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