SplitHTTP client: Add minUploadInterval (#3592)

This commit is contained in:
mmmray 2024-07-27 14:52:36 +02:00 committed by GitHub
parent 7cf5ee8afd
commit 8a4217fdf5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 188 additions and 25 deletions

View file

@ -231,6 +231,7 @@ type SplitHTTPConfig struct {
Headers map[string]string `json:"headers"`
MaxConcurrentUploads int32 `json:"maxConcurrentUploads"`
MaxUploadSize int32 `json:"maxUploadSize"`
MinUploadIntervalMs Int32Range `json:"minUploadIntervalMs"`
}
// Build implements Buildable.
@ -249,6 +250,10 @@ func (c *SplitHTTPConfig) Build() (proto.Message, error) {
Header: c.Headers,
MaxConcurrentUploads: c.MaxConcurrentUploads,
MaxUploadSize: c.MaxUploadSize,
MinUploadIntervalMs: &splithttp.RandRangeConfig{
From: c.MinUploadIntervalMs.From,
To: c.MinUploadIntervalMs.To,
},
}
return config, nil
}