mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
rebase: bump github.com/aws/aws-sdk-go-v2/service/sts
Bumps [github.com/aws/aws-sdk-go-v2/service/sts](https://github.com/aws/aws-sdk-go-v2) from 1.17.1 to 1.17.3. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.17.1...config/v1.17.3) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/service/sts dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
committed by
mergify[bot]
parent
f0cc5a0ef8
commit
0f0957164e
2
vendor/k8s.io/utils/net/port.go
generated
vendored
2
vendor/k8s.io/utils/net/port.go
generated
vendored
@ -29,7 +29,7 @@ type IPFamily string
|
||||
// Constants for valid IPFamilys:
|
||||
const (
|
||||
IPv4 IPFamily = "4"
|
||||
IPv6 = "6"
|
||||
IPv6 IPFamily = "6"
|
||||
)
|
||||
|
||||
// Protocol is a network protocol support by LocalPort.
|
||||
|
110
vendor/k8s.io/utils/pointer/pointer.go
generated
vendored
110
vendor/k8s.io/utils/pointer/pointer.go
generated
vendored
@ -53,6 +53,7 @@ func Int(i int) *int {
|
||||
}
|
||||
|
||||
// IntPtr is a function variable referring to Int.
|
||||
//
|
||||
// Deprecated: Use Int instead.
|
||||
var IntPtr = Int // for back-compat
|
||||
|
||||
@ -66,6 +67,7 @@ func IntDeref(ptr *int, def int) int {
|
||||
}
|
||||
|
||||
// IntPtrDerefOr is a function variable referring to IntDeref.
|
||||
//
|
||||
// Deprecated: Use IntDeref instead.
|
||||
var IntPtrDerefOr = IntDeref // for back-compat
|
||||
|
||||
@ -75,6 +77,7 @@ func Int32(i int32) *int32 {
|
||||
}
|
||||
|
||||
// Int32Ptr is a function variable referring to Int32.
|
||||
//
|
||||
// Deprecated: Use Int32 instead.
|
||||
var Int32Ptr = Int32 // for back-compat
|
||||
|
||||
@ -88,6 +91,7 @@ func Int32Deref(ptr *int32, def int32) int32 {
|
||||
}
|
||||
|
||||
// Int32PtrDerefOr is a function variable referring to Int32Deref.
|
||||
//
|
||||
// Deprecated: Use Int32Deref instead.
|
||||
var Int32PtrDerefOr = Int32Deref // for back-compat
|
||||
|
||||
@ -103,12 +107,73 @@ func Int32Equal(a, b *int32) bool {
|
||||
return *a == *b
|
||||
}
|
||||
|
||||
// Uint returns a pointer to an uint
|
||||
func Uint(i uint) *uint {
|
||||
return &i
|
||||
}
|
||||
|
||||
// UintPtr is a function variable referring to Uint.
|
||||
//
|
||||
// Deprecated: Use Uint instead.
|
||||
var UintPtr = Uint // for back-compat
|
||||
|
||||
// UintDeref dereferences the uint ptr and returns it if not nil, or else
|
||||
// returns def.
|
||||
func UintDeref(ptr *uint, def uint) uint {
|
||||
if ptr != nil {
|
||||
return *ptr
|
||||
}
|
||||
return def
|
||||
}
|
||||
|
||||
// UintPtrDerefOr is a function variable referring to UintDeref.
|
||||
//
|
||||
// Deprecated: Use UintDeref instead.
|
||||
var UintPtrDerefOr = UintDeref // for back-compat
|
||||
|
||||
// Uint32 returns a pointer to an uint32.
|
||||
func Uint32(i uint32) *uint32 {
|
||||
return &i
|
||||
}
|
||||
|
||||
// Uint32Ptr is a function variable referring to Uint32.
|
||||
//
|
||||
// Deprecated: Use Uint32 instead.
|
||||
var Uint32Ptr = Uint32 // for back-compat
|
||||
|
||||
// Uint32Deref dereferences the uint32 ptr and returns it if not nil, or else
|
||||
// returns def.
|
||||
func Uint32Deref(ptr *uint32, def uint32) uint32 {
|
||||
if ptr != nil {
|
||||
return *ptr
|
||||
}
|
||||
return def
|
||||
}
|
||||
|
||||
// Uint32PtrDerefOr is a function variable referring to Uint32Deref.
|
||||
//
|
||||
// Deprecated: Use Uint32Deref instead.
|
||||
var Uint32PtrDerefOr = Uint32Deref // for back-compat
|
||||
|
||||
// Uint32Equal returns true if both arguments are nil or both arguments
|
||||
// dereference to the same value.
|
||||
func Uint32Equal(a, b *uint32) bool {
|
||||
if (a == nil) != (b == nil) {
|
||||
return false
|
||||
}
|
||||
if a == nil {
|
||||
return true
|
||||
}
|
||||
return *a == *b
|
||||
}
|
||||
|
||||
// Int64 returns a pointer to an int64.
|
||||
func Int64(i int64) *int64 {
|
||||
return &i
|
||||
}
|
||||
|
||||
// Int64Ptr is a function variable referring to Int64.
|
||||
//
|
||||
// Deprecated: Use Int64 instead.
|
||||
var Int64Ptr = Int64 // for back-compat
|
||||
|
||||
@ -122,6 +187,7 @@ func Int64Deref(ptr *int64, def int64) int64 {
|
||||
}
|
||||
|
||||
// Int64PtrDerefOr is a function variable referring to Int64Deref.
|
||||
//
|
||||
// Deprecated: Use Int64Deref instead.
|
||||
var Int64PtrDerefOr = Int64Deref // for back-compat
|
||||
|
||||
@ -137,12 +203,49 @@ func Int64Equal(a, b *int64) bool {
|
||||
return *a == *b
|
||||
}
|
||||
|
||||
// Uint64 returns a pointer to an uint64.
|
||||
func Uint64(i uint64) *uint64 {
|
||||
return &i
|
||||
}
|
||||
|
||||
// Uint64Ptr is a function variable referring to Uint64.
|
||||
//
|
||||
// Deprecated: Use Uint64 instead.
|
||||
var Uint64Ptr = Uint64 // for back-compat
|
||||
|
||||
// Uint64Deref dereferences the uint64 ptr and returns it if not nil, or else
|
||||
// returns def.
|
||||
func Uint64Deref(ptr *uint64, def uint64) uint64 {
|
||||
if ptr != nil {
|
||||
return *ptr
|
||||
}
|
||||
return def
|
||||
}
|
||||
|
||||
// Uint64PtrDerefOr is a function variable referring to Uint64Deref.
|
||||
//
|
||||
// Deprecated: Use Uint64Deref instead.
|
||||
var Uint64PtrDerefOr = Uint64Deref // for back-compat
|
||||
|
||||
// Uint64Equal returns true if both arguments are nil or both arguments
|
||||
// dereference to the same value.
|
||||
func Uint64Equal(a, b *uint64) bool {
|
||||
if (a == nil) != (b == nil) {
|
||||
return false
|
||||
}
|
||||
if a == nil {
|
||||
return true
|
||||
}
|
||||
return *a == *b
|
||||
}
|
||||
|
||||
// Bool returns a pointer to a bool.
|
||||
func Bool(b bool) *bool {
|
||||
return &b
|
||||
}
|
||||
|
||||
// BoolPtr is a function variable referring to Bool.
|
||||
//
|
||||
// Deprecated: Use Bool instead.
|
||||
var BoolPtr = Bool // for back-compat
|
||||
|
||||
@ -156,6 +259,7 @@ func BoolDeref(ptr *bool, def bool) bool {
|
||||
}
|
||||
|
||||
// BoolPtrDerefOr is a function variable referring to BoolDeref.
|
||||
//
|
||||
// Deprecated: Use BoolDeref instead.
|
||||
var BoolPtrDerefOr = BoolDeref // for back-compat
|
||||
|
||||
@ -177,6 +281,7 @@ func String(s string) *string {
|
||||
}
|
||||
|
||||
// StringPtr is a function variable referring to String.
|
||||
//
|
||||
// Deprecated: Use String instead.
|
||||
var StringPtr = String // for back-compat
|
||||
|
||||
@ -190,6 +295,7 @@ func StringDeref(ptr *string, def string) string {
|
||||
}
|
||||
|
||||
// StringPtrDerefOr is a function variable referring to StringDeref.
|
||||
//
|
||||
// Deprecated: Use StringDeref instead.
|
||||
var StringPtrDerefOr = StringDeref // for back-compat
|
||||
|
||||
@ -211,6 +317,7 @@ func Float32(i float32) *float32 {
|
||||
}
|
||||
|
||||
// Float32Ptr is a function variable referring to Float32.
|
||||
//
|
||||
// Deprecated: Use Float32 instead.
|
||||
var Float32Ptr = Float32
|
||||
|
||||
@ -224,6 +331,7 @@ func Float32Deref(ptr *float32, def float32) float32 {
|
||||
}
|
||||
|
||||
// Float32PtrDerefOr is a function variable referring to Float32Deref.
|
||||
//
|
||||
// Deprecated: Use Float32Deref instead.
|
||||
var Float32PtrDerefOr = Float32Deref // for back-compat
|
||||
|
||||
@ -245,6 +353,7 @@ func Float64(i float64) *float64 {
|
||||
}
|
||||
|
||||
// Float64Ptr is a function variable referring to Float64.
|
||||
//
|
||||
// Deprecated: Use Float64 instead.
|
||||
var Float64Ptr = Float64
|
||||
|
||||
@ -258,6 +367,7 @@ func Float64Deref(ptr *float64, def float64) float64 {
|
||||
}
|
||||
|
||||
// Float64PtrDerefOr is a function variable referring to Float64Deref.
|
||||
//
|
||||
// Deprecated: Use Float64Deref instead.
|
||||
var Float64PtrDerefOr = Float64Deref // for back-compat
|
||||
|
||||
|
30
vendor/k8s.io/utils/trace/trace.go
generated
vendored
30
vendor/k8s.io/utils/trace/trace.go
generated
vendored
@ -21,6 +21,7 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"k8s.io/klog/v2"
|
||||
@ -93,13 +94,16 @@ func (s traceStep) writeItem(b *bytes.Buffer, formatter string, startTime time.T
|
||||
// Trace keeps track of a set of "steps" and allows us to log a specific
|
||||
// step if it took longer than its share of the total allowed time
|
||||
type Trace struct {
|
||||
// constant fields
|
||||
name string
|
||||
fields []Field
|
||||
threshold *time.Duration
|
||||
startTime time.Time
|
||||
endTime *time.Time
|
||||
traceItems []traceItem
|
||||
parentTrace *Trace
|
||||
// fields guarded by a lock
|
||||
lock sync.RWMutex
|
||||
threshold *time.Duration
|
||||
endTime *time.Time
|
||||
traceItems []traceItem
|
||||
}
|
||||
|
||||
func (t *Trace) time() time.Time {
|
||||
@ -138,6 +142,8 @@ func New(name string, fields ...Field) *Trace {
|
||||
// how long it took. The Fields add key value pairs to provide additional details about the trace
|
||||
// step.
|
||||
func (t *Trace) Step(msg string, fields ...Field) {
|
||||
t.lock.Lock()
|
||||
defer t.lock.Unlock()
|
||||
if t.traceItems == nil {
|
||||
// traces almost always have less than 6 steps, do this to avoid more than a single allocation
|
||||
t.traceItems = make([]traceItem, 0, 6)
|
||||
@ -153,7 +159,9 @@ func (t *Trace) Nest(msg string, fields ...Field) *Trace {
|
||||
newTrace := New(msg, fields...)
|
||||
if t != nil {
|
||||
newTrace.parentTrace = t
|
||||
t.lock.Lock()
|
||||
t.traceItems = append(t.traceItems, newTrace)
|
||||
t.lock.Unlock()
|
||||
}
|
||||
return newTrace
|
||||
}
|
||||
@ -163,7 +171,9 @@ func (t *Trace) Nest(msg string, fields ...Field) *Trace {
|
||||
// is logged.
|
||||
func (t *Trace) Log() {
|
||||
endTime := time.Now()
|
||||
t.lock.Lock()
|
||||
t.endTime = &endTime
|
||||
t.lock.Unlock()
|
||||
// an explicit logging request should dump all the steps out at the higher level
|
||||
if t.parentTrace == nil { // We don't start logging until Log or LogIfLong is called on the root trace
|
||||
t.logTrace()
|
||||
@ -178,13 +188,17 @@ func (t *Trace) Log() {
|
||||
// If the Trace is nested it is not immediately logged. Instead, it is logged when the trace it
|
||||
// is nested within is logged.
|
||||
func (t *Trace) LogIfLong(threshold time.Duration) {
|
||||
t.lock.Lock()
|
||||
t.threshold = &threshold
|
||||
t.lock.Unlock()
|
||||
t.Log()
|
||||
}
|
||||
|
||||
// logTopLevelTraces finds all traces in a hierarchy of nested traces that should be logged but do not have any
|
||||
// parents that will be logged, due to threshold limits, and logs them as top level traces.
|
||||
func (t *Trace) logTrace() {
|
||||
t.lock.RLock()
|
||||
defer t.lock.RUnlock()
|
||||
if t.durationIsWithinThreshold() {
|
||||
var buffer bytes.Buffer
|
||||
traceNum := rand.Int31()
|
||||
@ -244,9 +258,13 @@ func (t *Trace) calculateStepThreshold() *time.Duration {
|
||||
traceThreshold := *t.threshold
|
||||
for _, s := range t.traceItems {
|
||||
nestedTrace, ok := s.(*Trace)
|
||||
if ok && nestedTrace.threshold != nil {
|
||||
traceThreshold = traceThreshold - *nestedTrace.threshold
|
||||
lenTrace--
|
||||
if ok {
|
||||
nestedTrace.lock.RLock()
|
||||
if nestedTrace.threshold != nil {
|
||||
traceThreshold = traceThreshold - *nestedTrace.threshold
|
||||
lenTrace--
|
||||
}
|
||||
nestedTrace.lock.RUnlock()
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user