MCPcopy Create free account
hub / github.com/0xUnixIO/pulse / mockUsageAPI

Struct mockUsageAPI

internal/nodeagent/usage_test.go:15–19  ·  view source on GitHub ↗

mockUsageAPI 计数 DoUsage 调用,返回构造的 stats。

Source from the content-addressed store, hash-verified

13
14// mockUsageAPI 计数 DoUsage 调用,返回构造的 stats。
15type mockUsageAPI struct {
16 mu sync.Mutex
17 calls []bool // 每次调用的 reset 参数
18 stats coremanager.UsageStats
19}
20
21func (m *mockUsageAPI) DoUsage(reset bool) coremanager.UsageStats {
22 m.mu.Lock()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected