MCPcopy Create free account
hub / github.com/Hidden-Node/GooseRelayVPN-AndroidClient / pollScriptStats

Method pollScriptStats

internal/carrier/quota.go:130–144  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

128}
129
130func (c *Client) pollScriptStats(ctx context.Context) {
131 c.endpointMu.Lock()
132 urls := make([]string, len(c.endpoints))
133 for i := range c.endpoints {
134 urls[i] = c.endpoints[i].url
135 }
136 c.endpointMu.Unlock()
137
138 for i, url := range urls {
139 if ctx.Err() != nil {
140 return
141 }
142 c.fetchScriptStats(ctx, i, url)
143 }
144}
145
146func (c *Client) fetchScriptStats(ctx context.Context, idx int, url string) {
147 reqCtx, cancel := context.WithTimeout(ctx, scriptStatsRequestTimeout)

Callers 1

runScriptStatsLoopMethod · 0.95

Calls 1

fetchScriptStatsMethod · 0.95

Tested by

no test coverage detected