diff options
Diffstat (limited to 'pkg/api/api0')
| -rw-r--r-- | pkg/api/api0/serverlist.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/api/api0/serverlist.go b/pkg/api/api0/serverlist.go index 561acbe..2587f8b 100644 --- a/pkg/api/api0/serverlist.go +++ b/pkg/api/api0/serverlist.go @@ -572,6 +572,11 @@ func (s *ServerList) GetMetrics() []byte { return b.Bytes() } +// WritePrometheus writes metrics for s to w. +func (s *ServerList) WritePrometheus(w io.Writer) { + w.Write(s.GetMetrics()) +} + // GetLiveServers loops over live (i.e., not dead/ghost) servers until fn // returns false. The order of the servers is non-deterministic. func (s *ServerList) GetLiveServers(fn func(*Server) bool) { |
