MCPcopy Create free account
hub / github.com/PasarGuard/node / GetUserOnlineStats

Method GetUserOnlineStats

controller/rpc/stats.go:18–25  ·  view source on GitHub ↗
(ctx context.Context, request *common.StatRequest)

Source from the content-addressed store, hash-verified

16}
17
18func (s *Service) GetUserOnlineStats(ctx context.Context, request *common.StatRequest) (*common.OnlineStatResponse, error) {
19 stats, err := s.Backend().GetUserOnlineStats(ctx, request.GetName())
20 if err != nil {
21 err = common.InterceptNotFound(err)
22 return nil, err
23 }
24 return stats, nil
25}
26
27func (s *Service) GetUserOnlineIpListStats(ctx context.Context, request *common.StatRequest) (*common.StatsOnlineIpListResponse, error) {
28 stats, err := s.Backend().GetUserOnlineIpListStats(ctx, request.GetName())

Callers

nothing calls this directly

Implementers 1

Controllercontroller/controller.go

Calls 4

InterceptNotFoundFunction · 0.92
BackendMethod · 0.80
GetUserOnlineStatsMethod · 0.65
GetNameMethod · 0.45

Tested by

no test coverage detected