removed the extra stats table

This commit is contained in:
2025-01-17 00:20:38 +09:00
parent 369a41eeb2
commit 9118acb268
2 changed files with 1 additions and 18 deletions

View File

@ -93,9 +93,6 @@ type Server struct {
routes atomic.Int64
peers atomic.Int64
ssh_proxy_sessions atomic.Int64
extra_mtx sync.Mutex
extra map[string]int64
}
wpx_resp_tf ServerWpxResponseTransformer
@ -1145,7 +1142,6 @@ func NewServer(ctx context.Context, logger Logger, ctl_addrs []string, rpc_addrs
s.stats.routes.Store(0)
s.stats.peers.Store(0)
s.stats.ssh_proxy_sessions.Store(0)
s.stats.extra = make(map[string]int64, 64)
return &s, nil
@ -1661,12 +1657,6 @@ func (s *Server) WriteLog(id string, level LogLevel, fmtstr string, args ...inte
s.log.Write(id, level, fmtstr, args...)
}
func (s *Server) SetExtraStat(key string, val int64) {
s.stats.extra_mtx.Lock()
s.stats.extra[key] = val
s.stats.extra_mtx.Unlock()
}
func (s *Server) AddCtlHandler(path string, handler ServerHttpHandler) {
s.ctl_mux.Handle(s.ctl_prefix + "/_ctl" + path, s.wrap_http_handler(handler))
}