API: Add GetAllOnlineUsers RPC to StatsService for retrieving online users (#5080)

This commit is contained in:
Maxim Plotnikov
2025-12-27 00:07:06 +03:00
committed by GitHub
parent 6738ecf68e
commit ad468e462d
8 changed files with 366 additions and 220 deletions

View File

@@ -98,6 +98,9 @@ type Manager interface {
UnregisterChannel(string) error
// GetChannel returns a channel by its identifier.
GetChannel(string) Channel
// GetAllOnlineUsers returns all online users from all OnlineMaps.
GetAllOnlineUsers() []string
}
// GetOrRegisterCounter tries to get the StatCounter first. If not exist, it then tries to create a new counter.
@@ -190,6 +193,11 @@ func (NoopManager) GetChannel(string) Channel {
return nil
}
// GetAllOnlineUsers implements Manager.
func (NoopManager) GetAllOnlineUsers() []string {
return nil
}
// Start implements common.Runnable.
func (NoopManager) Start() error { return nil }