Documentation
¶
Index ¶
- Variables
- func ResetAllCounters() (map[string]int64, map[string]int64)
- func ResetBackendCounters() map[string]int64
- func ResetFrontendCounters() map[string]int64
- type Counter
- type ResettableMap
- func (rm *ResettableMap) Add(key string, delta int64)
- func (rm *ResettableMap) Get(key string) int64
- func (rm *ResettableMap) Reset(key string) int64
- func (rm *ResettableMap) ResetAll() map[string]int64
- func (rm *ResettableMap) Set(key string, value interface{})
- func (rm *ResettableMap) String() string
- type Stringer
Constants ¶
This section is empty.
Variables ¶
var ( Frontend = NewResettableMap() Backend = NewResettableMap() General = expvar.NewMap("proxy") )
exposed expvar variables
Functions ¶
func ResetAllCounters ¶ added in v2.4.47
ResetAllCounters resets all frontend and backend counters and returns their previous values
func ResetBackendCounters ¶ added in v2.4.47
ResetBackendCounters resets all backend counters and returns their previous values
func ResetFrontendCounters ¶ added in v2.4.47
ResetFrontendCounters resets all frontend counters and returns their previous values
Types ¶
type Counter ¶ added in v2.4.47
type Counter struct {
// contains filtered or unexported fields
}
Counter represents a thread-safe counter that can be reset
type ResettableMap ¶ added in v2.4.47
type ResettableMap struct {
// contains filtered or unexported fields
}
ResettableMap is a thread-safe map of counters that can be reset
func NewResettableMap ¶ added in v2.4.47
func NewResettableMap() *ResettableMap
NewResettableMap creates a new ResettableMap
func (*ResettableMap) Add ¶ added in v2.4.47
func (rm *ResettableMap) Add(key string, delta int64)
Add increments a counter by the given value, creating it if it doesn't exist
func (*ResettableMap) Get ¶ added in v2.4.47
func (rm *ResettableMap) Get(key string) int64
Get returns the current value of a counter
func (*ResettableMap) Reset ¶ added in v2.4.47
func (rm *ResettableMap) Reset(key string) int64
Reset resets a specific counter and returns its previous value
func (*ResettableMap) ResetAll ¶ added in v2.4.47
func (rm *ResettableMap) ResetAll() map[string]int64
ResetAll resets all counters and returns a map of their previous values
func (*ResettableMap) Set ¶ added in v2.4.48
func (rm *ResettableMap) Set(key string, value interface{})
Set sets a counter to a specific value, creating it if it doesn't exist
func (*ResettableMap) String ¶ added in v2.4.47
func (rm *ResettableMap) String() string
String implements the expvar.Var interface