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

Method GetInboundStats

backend/xray/api/stats.go:116–126  ·  view source on GitHub ↗
(ctx context.Context, tag string, reset bool)

Source from the content-addressed store, hash-verified

114}
115
116func (x *XrayHandler) GetInboundStats(ctx context.Context, tag string, reset bool) (*common.StatResponse, error) {
117 if tag == "" {
118 return nil, errors.New("tag required")
119 }
120 resp, err := x.QueryStats(ctx, fmt.Sprintf("inbound>>>%s>>>", tag), reset)
121 if err != nil {
122 return nil, err
123 }
124
125 return buildStatResponse(resp.GetStat()), nil
126}
127
128func (x *XrayHandler) GetOutboundStats(ctx context.Context, tag string, reset bool) (*common.StatResponse, error) {
129 if tag == "" {

Callers 1

GetStatsMethod · 0.80

Calls 2

QueryStatsMethod · 0.95
buildStatResponseFunction · 0.85

Tested by

no test coverage detected