mirror of
https://github.com/kubernetes/node-problem-detector.git
synced 2026-08-28 01:47:20 +00:00
Fix Grype CVEs: update logrus and prometheus/prometheus
- Update github.com/sirupsen/logrus v1.9.0 -> v1.9.3 in test/go.mod to fix GHSA-4f99-4q7p-p3gh (High) - Update github.com/prometheus/prometheus v0.35.0 -> v0.311.3 to fix GHSA-vffh-x6r8-xx99 (Medium) - Run go mod tidy and go mod vendor to update vendor directory
This commit is contained in:
+15
@@ -333,6 +333,20 @@ func ChunkRetryDeadline(deadline time.Duration) MediaOption {
|
||||
return chunkRetryDeadlineOption(deadline)
|
||||
}
|
||||
|
||||
type enableAutoChecksumOption struct{}
|
||||
|
||||
func (d enableAutoChecksumOption) setOptions(o *MediaOptions) {
|
||||
o.EnableAutoChecksum = true
|
||||
}
|
||||
|
||||
// EnableAutoChecksum returns a MediaOption that enables automatic checksum
|
||||
// calculation, which is only supported for resumable multi-chunk uploads.
|
||||
// The computed checksum is sent on the final upload request to the server.
|
||||
// Writes are rejected in the event of a checksum mismatch.
|
||||
func EnableAutoChecksum() MediaOption {
|
||||
return enableAutoChecksumOption{}
|
||||
}
|
||||
|
||||
// MediaOptions stores options for customizing media upload. It is not used by developers directly.
|
||||
type MediaOptions struct {
|
||||
ContentType string
|
||||
@@ -340,6 +354,7 @@ type MediaOptions struct {
|
||||
ChunkSize int
|
||||
ChunkRetryDeadline time.Duration
|
||||
ChunkTransferTimeout time.Duration
|
||||
EnableAutoChecksum bool
|
||||
}
|
||||
|
||||
// ProcessMediaOptions stores options from opts in a MediaOptions.
|
||||
|
||||
Reference in New Issue
Block a user