Std.App.Idempotency
17 public declarations
- begin
&Std.App.Idempotency.Store -> Str -> Str -> Int -> Std.App.Idempotency.StoreThe store with
keyrecorded as running. - decide
&Std.App.Idempotency.Store -> Str -> Str -> Int -> Std.App.Idempotency.DecisionWhat to do with a request using
keywhose body hashes tofingerprint. - Decision
What to do with a request carrying a key.
- fingerprintOf
&Std.Http.Server.Route.Request -> StrA hash of the method, path, and body: the same key reused for a
- finish
&Std.App.Idempotency.Store -> Str -> &Std.Http.Response -> Int -> Std.App.Idempotency.StoreThe store with the answer for
keyrecorded. - guarded
Std.App.Idempotency.Shared -> fn() -> Int -> fn(Std.Http.Server.Route.Request, fn(Std.Http.Server.Route.Request) -> Std.Http.Response) -> Std.Http.ResponseA step answering a repeated key with the stored answer.
- HEADER
StrThe request header carrying the key.
- Held
One key's state: the request it was first used with, and the answer once
- keyOf
&Std.Http.Server.Route.Request -> Option[Str]The key a request carries, if any.
- live
&Std.App.Idempotency.Store -> Int -> IntEntries not yet expired.
- prune
&Std.App.Idempotency.Store -> Int -> Std.App.Idempotency.StoreThe store without expired entries.
- release
&Std.App.Idempotency.Store -> Str -> Std.App.Idempotency.StoreThe store without
key. - REPLAYED
StrThe response header marking a replayed answer.
- shared
Int -> Int -> Std.App.Idempotency.SharedAn empty store shared behind a lock.
- Shared
A store shared by the requests of one service.
- store
Int -> Int -> Std.App.Idempotency.StoreAn empty store.
- Store
Keys seen within
lifetimemilliseconds, at mostcapacityof them.
