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

Struct statefulIdem

internal/httpapi/webhooks_rotate_idem_test.go:22–26  ·  view source on GitHub ↗

statefulIdem is an in-memory idempotency store: first Claim of a key wins (Acquired), Complete caches the response, and a later Claim of the same key replays it. Enough to exercise the retry-replay path end to end.

Source from the content-addressed store, hash-verified

20// (Acquired), Complete caches the response, and a later Claim of the same key
21// replays it. Enough to exercise the retry-replay path end to end.
22type statefulIdem struct {
23 mu sync.Mutex
24 cached map[string]idempotency.CachedResponse
25 inflight map[string]bool
26}
27
28func newStatefulIdem() *statefulIdem {
29 return &statefulIdem{cached: map[string]idempotency.CachedResponse{}, inflight: map[string]bool{}}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected