Сделать отправку сообщения идемпотентной по Idempotency-Key с общей таблицей ключей и их чисткой

This commit is contained in:
2026-11-02 17:11:04 +03:00
parent 7fa8881eb3
commit 951fd0d517
19 changed files with 856 additions and 40 deletions
+9
View File
@@ -0,0 +1,9 @@
package store
// SetAfterClaim installs a hook that runs between the claiming statement and
// the replay lookup of AppendOnce; it returns a function restoring the old one.
func SetAfterClaim(hook func()) (restore func()) {
old := afterClaim
afterClaim = hook
return func() { afterClaim = old }
}