From 9e205573ea4a865b8740d0a2496a772800b8c2a4 Mon Sep 17 00:00:00 2001 From: d1slike Date: Tue, 26 Jul 2022 21:29:13 +0300 Subject: [PATCH] MSP-437 add throttling domain --- domain/throttling.go | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 domain/throttling.go diff --git a/domain/throttling.go b/domain/throttling.go new file mode 100644 index 0000000..6272732 --- /dev/null +++ b/domain/throttling.go @@ -0,0 +1,11 @@ +package domain + +import ( + "time" +) + +type RateLimitResult struct { + Allow bool + Remaining int + RetryAfter time.Duration +}