Исправить замечания ревью кода: убрать повтор в AppendOnce за счёт запаса у чистки ключей, вынести MessagePayload и SameContent, принять X-Request-Id от балансировщика, упростить фоновые задачи сервера, сократить комментарии

This commit is contained in:
2026-11-04 12:19:49 +03:00
parent c9d0f73221
commit 7fbd781ca3
25 changed files with 207 additions and 247 deletions
+2 -3
View File
@@ -27,9 +27,8 @@ func New() uuid.UUID {
return id
}
// NewAlias names one server process for X-Instance-Id. It is random rather
// than the hostname, so the header reveals nothing about the infrastructure,
// and a restarted process gets a new one.
// NewAlias names one server process for X-Instance-Id; random rather than the
// hostname, so the header reveals nothing about the infrastructure.
func NewAlias() string {
var raw [8]byte
_, _ = rand.Read(raw[:]) // crypto/rand.Read never returns an error since Go 1.24.