package expvar

Import Path
	expvar (on golang.org and go.dev)

Dependency Relation
	imports 12 packages, and imported by 0 packages

Involved Source Files
	d-> expvar.go

Exported Type Names

type Float (struct) Float is a 64-bit float variable that satisfies the Var interface. (*T) Add(delta float64) (*T) Set(value float64) (*T) String() string (*T) Value() float64 *T : Var *T : fmt.Stringer func NewFloat(name string) *Float
type Func (func) Func implements Var by calling the function and formatting the returned value using JSON. (T) String() string (T) Value() interface{} T : Var T : fmt.Stringer
type Int (struct) Int is a 64-bit integer variable that satisfies the Var interface. (*T) Add(delta int64) (*T) Set(value int64) (*T) String() string (*T) Value() int64 *T : Var *T : fmt.Stringer func NewInt(name string) *Int
type KeyValue (struct) KeyValue represents a single entry in a Map. Key string Value Var
type Map (struct) Map is a string-to-Var map variable that satisfies the Var interface. (*T) Add(key string, delta int64) (*T) AddFloat(key string, delta float64) (*T) Delete(key string) (*T) Do(f func(KeyValue)) (*T) Get(key string) Var (*T) Init() *Map (*T) Set(key string, av Var) (*T) String() string *T : Var *T : fmt.Stringer func NewMap(name string) *Map func (*Map).Init() *Map
type String (struct) String is a string variable, and satisfies the Var interface. (*T) Set(value string) (*T) String() string (*T) Value() string *T : Var *T : fmt.Stringer func NewString(name string) *String
type Var (interface) Var is an abstract type for all exported variables. (T) String() string *Float Func *Int *Map *String archive/tar.Format bytes.(*Buffer) crypto.Hash crypto/tls.ClientAuthType crypto/tls.CurveID crypto/tls.SignatureScheme crypto/x509.PublicKeyAlgorithm crypto/x509.SignatureAlgorithm crypto/x509/pkix.Name crypto/x509/pkix.RDNSequence database/sql.IsolationLevel debug/dwarf.(*AddrType) debug/dwarf.(*ArrayType) debug/dwarf.Attr debug/dwarf.(*BasicType) debug/dwarf.(*BoolType) debug/dwarf.(*CharType) debug/dwarf.Class debug/dwarf.(*ComplexType) debug/dwarf.(*DotDotDotType) debug/dwarf.(*EnumType) debug/dwarf.(*FloatType) debug/dwarf.(*FuncType) debug/dwarf.(*IntType) debug/dwarf.(*PtrType) debug/dwarf.(*QualType) debug/dwarf.(*StructType) debug/dwarf.Tag debug/dwarf.Type (interface) debug/dwarf.(*TypedefType) debug/dwarf.(*UcharType) debug/dwarf.(*UintType) debug/dwarf.(*UnspecifiedType) debug/dwarf.(*UnsupportedType) debug/dwarf.(*VoidType) debug/elf.Class debug/elf.CompressionType debug/elf.Data debug/elf.DynFlag debug/elf.DynTag debug/elf.Machine debug/elf.NType debug/elf.OSABI debug/elf.ProgFlag debug/elf.ProgType debug/elf.R_386 debug/elf.R_390 debug/elf.R_AARCH64 debug/elf.R_ALPHA debug/elf.R_ARM debug/elf.R_MIPS debug/elf.R_PPC debug/elf.R_PPC64 debug/elf.R_RISCV debug/elf.R_SPARC debug/elf.R_X86_64 debug/elf.SectionFlag debug/elf.SectionIndex debug/elf.SectionType debug/elf.SymBind debug/elf.SymType debug/elf.SymVis debug/elf.Type debug/elf.Version debug/macho.Cpu debug/macho.LoadCmd debug/macho.RelocTypeARM debug/macho.RelocTypeARM64 debug/macho.RelocTypeGeneric debug/macho.RelocTypeX86_64 debug/macho.Type encoding/asn1.ObjectIdentifier encoding/binary.ByteOrder (interface) encoding/json.Delim encoding/json.Number flag.Getter (interface) flag.Value (interface) fmt.Stringer (interface) go/ast.CommentMap go/ast.(*Ident) go/ast.ObjKind go/ast.(*Scope) go/constant.Value (interface) go/token.Position go/token.Token go/types.(*Array) go/types.(*Basic) go/types.(*Builtin) go/types.(*Chan) go/types.(*Const) go/types.(*Func) go/types.(*Initializer) go/types.(*Interface) go/types.(*Label) go/types.(*Map) go/types.(*MethodSet) go/types.(*Named) go/types.(*Nil) go/types.Object (interface) go/types.(*Package) go/types.(*PkgName) go/types.(*Pointer) go/types.(*Scope) go/types.(*Selection) go/types.(*Signature) go/types.(*Slice) go/types.(*Struct) go/types.(*Tuple) go/types.Type (interface) go/types.(*TypeName) go/types.(*Var) image.Point image.Rectangle image.YCbCrSubsampleRatio internal/profile.(*Profile) internal/reflectlite.Type (interface) internal/trace.(*Event) internal/trace.(*Writer) math/big.Accuracy math/big.(*Float) math/big.(*Int) math/big.(*Rat) math/big.RoundingMode net.Addr (interface) net.Flags net.HardwareAddr net.IP net.(*IPAddr) net.IPMask net.(*IPNet) net.(*TCPAddr) net.(*UDPAddr) net.(*UnixAddr) net/http.ConnState net/http.(*Cookie) net/http/cookiejar.PublicSuffixList (interface) net/internal/socktest.Stat net/internal/socktest.Status net/mail.(*Address) net/url.(*URL) net/url.(*Userinfo) os.FileMode os.(*ProcessState) os.Signal (interface) os/exec.(*Cmd) os/exec.ExitError reflect.ChanDir reflect.Kind reflect.Type (interface) reflect.Value regexp.(*Regexp) regexp/syntax.ErrorCode regexp/syntax.(*Inst) regexp/syntax.InstOp regexp/syntax.Op regexp/syntax.(*Prog) regexp/syntax.(*Regexp) strings.(*Builder) syscall.Signal testing.BenchmarkResult text/scanner.Position text/scanner.Scanner text/template/parse.(*ActionNode) text/template/parse.(*BoolNode) text/template/parse.(*BranchNode) text/template/parse.(*ChainNode) text/template/parse.(*CommandNode) text/template/parse.(*DotNode) text/template/parse.(*FieldNode) text/template/parse.(*IdentifierNode) text/template/parse.(*IfNode) text/template/parse.(*ListNode) text/template/parse.(*NilNode) text/template/parse.Node (interface) text/template/parse.(*NumberNode) text/template/parse.(*PipeNode) text/template/parse.(*RangeNode) text/template/parse.(*StringNode) text/template/parse.(*TemplateNode) text/template/parse.(*TextNode) text/template/parse.(*VariableNode) text/template/parse.(*WithNode) time.Duration time.(*Location) time.Month time.Time time.Weekday vendor/golang.org/x/net/dns/dnsmessage.Class vendor/golang.org/x/net/dns/dnsmessage.Name vendor/golang.org/x/net/dns/dnsmessage.RCode vendor/golang.org/x/net/dns/dnsmessage.Type vendor/golang.org/x/net/http2/hpack.HeaderField vendor/golang.org/x/net/idna.(*Profile) vendor/golang.org/x/text/unicode/bidi.(*Run) T : fmt.Stringer func Get(name string) Var func (*Map).Get(key string) Var func Publish(name string, v Var) func (*Map).Set(key string, av Var)
Exported Values
func Do(f func(KeyValue)) Do calls f for each exported variable. The global variable map is locked during the iteration, but existing entries may be concurrently updated.
func Get(name string) Var Get retrieves a named exported variable. It returns nil if the name has not been registered.
func Handler() http.Handler Handler returns the expvar HTTP Handler. This is only needed to install the handler in a non-standard location.
func NewFloat(name string) *Float
func NewInt(name string) *Int
func NewMap(name string) *Map
func NewString(name string) *String
func Publish(name string, v Var) Publish declares a named exported variable. This should be called from a package's init function when it creates its Vars. If the name is already registered then this will log.Panic.