Update dependencies

This commit is contained in:
bluepython508
2025-04-09 01:00:12 +01:00
parent f0641ffd6e
commit 5a9cfc022c
882 changed files with 68930 additions and 24201 deletions

View File

@@ -14,11 +14,15 @@ import (
"tailscale.com/metrics"
"tailscale.com/tsweb/varz"
"tailscale.com/util/set"
)
// Registry tracks user-facing metrics of various Tailscale subsystems.
type Registry struct {
vars expvar.Map
// m contains common metrics owned by the registry.
m Metrics
}
// NewMultiLabelMapWithRegistry creates and register a new
@@ -103,3 +107,13 @@ func (r *Registry) String() string {
return sb.String()
}
// Metrics returns the name of all the metrics in the registry.
func (r *Registry) MetricNames() []string {
ret := make(set.Set[string])
r.vars.Do(func(kv expvar.KeyValue) {
ret.Add(kv.Key)
})
return ret.Slice()
}