expvar

package
v0.0.0-...-e50112c Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

对 golang 内置的 expvar 的扩展

Index

Constants

This section is empty.

Variables

View Source
var Default = New()

Functions

func Each

func Each(f func(key string, val interface{}), sortKeys ...int)

func Publish

func Publish(name string, f VarFunc)

func PublishMap

func PublishMap(f VarMapFunc)

Types

type VarFunc

type VarFunc func() interface{}

func IntVarFunc

func IntVarFunc(f func() int) VarFunc

type VarMapFunc

type VarMapFunc func() (vars map[string]interface{})

type VarSet

type VarSet interface {
	Publish(name string, f VarFunc)
	PublishMap(f VarMapFunc)
	All() mapUtil.StringObjectMap
	Each(f func(key string, val interface{}), sortKeys ...int)
}

func New

func New() VarSet

Jump to

Keyboard shortcuts

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