MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / SetUsageStore

Method SetUsageStore

internal/agent/api.go:497–497  ·  view source on GitHub ↗

SetUsageStore wires in the usage store used by handleGetMyLimits to surface the user's current counts (agents, domains, messages this month, storage bytes) alongside the resolved caps. Separate from the usage.UsageTracker (which is for recording events) so the dashboard read path can stay alive even

(s *usage.Store)

Source from the content-addressed store, hash-verified

495// usage.UsageTracker (which is for recording events) so the dashboard
496// read path can stay alive even when usage-tracking is otherwise off.
497func (a *API) SetUsageStore(s *usage.Store) { a.usageStore = s }
498
499// SetInternalAPISecret wires in the shared HMAC secret used to
500// authenticate the /api/internal/limits/invalidate endpoint. When

Callers 7

TestServerFunction · 0.95
NewEventsAPIHarnessFunction · 0.95
StartContractServerFunction · 0.95
newConsentFixtureFunction · 0.95
setupAPIWithLimitsFunction · 0.95
mainFunction · 0.95

Calls

no outgoing calls

Tested by 4

TestServerFunction · 0.76
newConsentFixtureFunction · 0.76
setupAPIWithLimitsFunction · 0.76