added a stat item to the server

This commit is contained in:
2024-12-16 01:03:03 +09:00
parent fe67d9e16f
commit ec6577aed2
4 changed files with 15 additions and 5 deletions

View File

@ -69,6 +69,7 @@ type Server struct {
conns atomic.Int64
routes atomic.Int64
peers atomic.Int64
ssh_proxy_sessions atomic.Int64
}
UnimplementedHoduServer
@ -998,6 +999,7 @@ func NewServer(ctx context.Context, logger Logger, ctl_addrs []string, rpc_addrs
s.stats.conns.Store(0)
s.stats.routes.Store(0)
s.stats.peers.Store(0)
s.stats.ssh_proxy_sessions.Store(0)
return &s, nil