added pty terminal support to the client side

This commit is contained in:
2025-06-21 02:43:28 +09:00
parent 01eb2edd6e
commit 6baf3b2b53
15 changed files with 748 additions and 35 deletions

View File

@ -10,6 +10,7 @@ type ClientCollector struct {
ClientConns *prometheus.Desc
ClientRoutes *prometheus.Desc
ClientPeers *prometheus.Desc
PtsSessions *prometheus.Desc
}
// NewClientCollector returns a new ClientCollector with all prometheus.Desc initialized
@ -46,6 +47,11 @@ func NewClientCollector(client *Client) ClientCollector {
"Number of client-side peers",
nil, nil,
),
PtsSessions: prometheus.NewDesc(
prefix + "pts_sessions",
"Number of pts sessions",
nil, nil,
),
}
}
@ -84,4 +90,10 @@ func (c ClientCollector) Collect(ch chan<- prometheus.Metric) {
prometheus.GaugeValue,
float64(c.client.stats.peers.Load()),
)
ch <- prometheus.MustNewConstMetric(
c.PtsSessions,
prometheus.GaugeValue,
float64(c.client.stats.pts_sessions.Load()),
)
}