Исправить замечания ревью кода: убрать повтор в AppendOnce за счёт запаса у чистки ключей, вынести MessagePayload и SameContent, принять X-Request-Id от балансировщика, упростить фоновые задачи сервера, сократить комментарии
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user