feat: 完善服务监控与下游重投
This commit is contained in:
@@ -201,6 +201,13 @@ func onlineAccounts() []string {
|
||||
return accounts
|
||||
}
|
||||
|
||||
// ActiveConnectionCount exposes only an aggregate gauge; account and remote-IP labels are intentionally excluded.
|
||||
func ActiveConnectionCount() int {
|
||||
downstreamRegistry.RLock()
|
||||
defer downstreamRegistry.RUnlock()
|
||||
return len(downstreamRegistry.byConn)
|
||||
}
|
||||
|
||||
// DisconnectAccount closes every live downstream CMPP session for an
|
||||
// application account. The normal connection-close callback removes registry
|
||||
// and presence state and reports the disconnect to the API.
|
||||
|
||||
Reference in New Issue
Block a user