Исправить замечания ревью кода: убрать повтор в AppendOnce за счёт запаса у чистки ключей, вынести MessagePayload и SameContent, принять X-Request-Id от балансировщика, упростить фоновые задачи сервера, сократить комментарии
This commit is contained in:
+2
-5
@@ -39,10 +39,8 @@ type Deps struct {
|
||||
MaxBodyBytes int64
|
||||
// RequestTimeout bounds every API request; zero means the default.
|
||||
RequestTimeout time.Duration
|
||||
// InstanceID is sent as X-Instance-Id on every response.
|
||||
InstanceID string
|
||||
// IdempotencyTTL is how long a message Idempotency-Key is remembered;
|
||||
// zero means the default.
|
||||
InstanceID string
|
||||
// IdempotencyTTL zero means the contract's 24 hours.
|
||||
IdempotencyTTL time.Duration
|
||||
}
|
||||
|
||||
@@ -50,7 +48,6 @@ type Deps struct {
|
||||
// request that gives up on a dependency can still write its 503.
|
||||
const defaultRequestTimeout = 5 * time.Second
|
||||
|
||||
// defaultIdempotencyTTL is the contract's retention of message keys.
|
||||
const defaultIdempotencyTTL = 24 * time.Hour
|
||||
|
||||
func New(d Deps) *App {
|
||||
|
||||
Reference in New Issue
Block a user