mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 18:43:34 +00:00
rebase: update kubernetes to v1.20.0
updated kubernetes packages to latest release. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
4abe128bd8
commit
83559144b1
29
vendor/github.com/aws/aws-sdk-go/internal/sdkrand/locked_source.go
generated
vendored
Normal file
29
vendor/github.com/aws/aws-sdk-go/internal/sdkrand/locked_source.go
generated
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
package sdkrand
|
||||
|
||||
import (
|
||||
"math/rand"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
// lockedSource is a thread-safe implementation of rand.Source
|
||||
type lockedSource struct {
|
||||
lk sync.Mutex
|
||||
src rand.Source
|
||||
}
|
||||
|
||||
func (r *lockedSource) Int63() (n int64) {
|
||||
r.lk.Lock()
|
||||
n = r.src.Int63()
|
||||
r.lk.Unlock()
|
||||
return
|
||||
}
|
||||
|
||||
func (r *lockedSource) Seed(seed int64) {
|
||||
r.lk.Lock()
|
||||
r.src.Seed(seed)
|
||||
r.lk.Unlock()
|
||||
}
|
||||
|
||||
// SeededRand is a new RNG using a thread safe implementation of rand.Source
|
||||
var SeededRand = rand.New(&lockedSource{src: rand.NewSource(time.Now().UnixNano())})
|
11
vendor/github.com/aws/aws-sdk-go/internal/sdkrand/read.go
generated
vendored
Normal file
11
vendor/github.com/aws/aws-sdk-go/internal/sdkrand/read.go
generated
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
// +build go1.6
|
||||
|
||||
package sdkrand
|
||||
|
||||
import "math/rand"
|
||||
|
||||
// Read provides the stub for math.Rand.Read method support for go version's
|
||||
// 1.6 and greater.
|
||||
func Read(r *rand.Rand, p []byte) (int, error) {
|
||||
return r.Read(p)
|
||||
}
|
24
vendor/github.com/aws/aws-sdk-go/internal/sdkrand/read_1_5.go
generated
vendored
Normal file
24
vendor/github.com/aws/aws-sdk-go/internal/sdkrand/read_1_5.go
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
// +build !go1.6
|
||||
|
||||
package sdkrand
|
||||
|
||||
import "math/rand"
|
||||
|
||||
// Read backfills Go 1.6's math.Rand.Reader for Go 1.5
|
||||
func Read(r *rand.Rand, p []byte) (n int, err error) {
|
||||
// Copy of Go standard libraries math package's read function not added to
|
||||
// standard library until Go 1.6.
|
||||
var pos int8
|
||||
var val int64
|
||||
for n = 0; n < len(p); n++ {
|
||||
if pos == 0 {
|
||||
val = r.Int63()
|
||||
pos = 7
|
||||
}
|
||||
p[n] = byte(val)
|
||||
val >>= 8
|
||||
pos--
|
||||
}
|
||||
|
||||
return n, err
|
||||
}
|
Reference in New Issue
Block a user