Package expvar provides a standardized interface to public variables, such as operation counters in servers. It exposes these variables via HTTP at /debug/vars in JSON format.
Operations to set or modify these public variables are atomic.
In addition to adding the HTTP handler, this package registers the following variables:
cmdline os.Args memstats runtime.Memstats
The package is sometimes only imported for the side effect of registering its HTTP handler and the above variables. To use it this way, link this package into your program:
import _ "expvar"
// import _ "expvar" // package expvar import (
// license that can be found in the LICENSE file. package expvar import (
expvar is referenced in 403 repositoriesgithub.com/golang/go github.com/elastic/beats
- 11 references in libbeat/logp/logp.go
- 8 references in libbeat/outputs/elasticsearch/client.go
- 8 references in libbeat/outputs/logstash/logstash.go
- 6 references in filebeat/harvester/log.go
- 6 references in libbeat/logp/logp_test.go
- 11 references in monitor/service.go
- 10 references in influxvar.go
- 10 references in services/subscriber/service.go
- 6 references in tsdb/engine/tsm1/wal.go
- 5 references in services/httpd/handler.go