mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 18:53:35 +00:00
rebase: update packages in go.mod to latest releases
updated few packages in go.mod to latest available release. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
0f44c6acb7
commit
fb7dc13dfe
go.modgo.summodules.txt
vendor
github.com
aws
aws-sdk-go
fsnotify
fsnotify
google
go-cmp
grpc-ecosystem
go-grpc-middleware
hpcloud
tail
kubernetes-csi
csi-lib-utils
nxadm
tail
onsi
ginkgo
.travis.ymlCHANGELOG.mdREADME.mdRELEASING.md
config
formatter
ginkgo_dsl.gogo.modgo.suminternal
global
remote
aggregator.gooutput_interceptor_unix.gosyscall_dup_linux_arm64.gosyscall_dup_linux_riscv64.gosyscall_dup_solaris.gosyscall_dup_unix.go
spec
suite
testingtproxy
reporters
types
gomega
.travis.ymlCHANGELOG.mdDockerfileMakefiledocker-compose.yamlenv.gomatchers.go
format
go.modgo.sumgomega_dsl.gointernal
defaults
matchers
pborman
prometheus
client_golang
prometheus
common
procfs
Makefile.commonSECURITY.mdarp.gobuddyinfo.gocpuinfo.gocpuinfo_riscvx.gocrypto.gofixtures.ttarfscache.gogo.modgo.sumloadavg.gomdstat.gomeminfo.gomountstats.gonet_conntrackstat.gonet_ip_socket.gonet_protocols.gonet_sockstat.gonet_softnet.gonet_tcp.gonet_udp.gonet_unix.goproc.goproc_cgroup.goproc_fdinfo.goproc_limits.goproc_ns.goproc_psi.goproc_stat.goschedstat.goslab.gostat.goxfrm.gozoneinfo.go
internal
fs
golang.org
x
net
context
http
httpguts
http2
idna
sys
cpu
asm_aix_ppc64.scpu_aix.gocpu_arm64.scpu_gc_arm64.gocpu_gc_s390x.gocpu_gc_x86.gocpu_gccgo_arm64.gocpu_gccgo_s390x.gocpu_gccgo_x86.gocpu_linux.gocpu_linux_mips64x.gocpu_linux_noinit.gocpu_linux_ppc64x.gocpu_mips64x.gocpu_mipsx.gocpu_other_arm.gocpu_other_arm64.gocpu_other_mips64x.gocpu_ppc64x.gocpu_riscv64.gocpu_s390x.scpu_wasm.gocpu_x86.gocpu_x86.ssyscall_aix_gccgo.gosyscall_aix_ppc64_gc.go
unix
aliases.goasm_aix_ppc64.sasm_bsd_386.sasm_bsd_amd64.sasm_bsd_arm.sasm_bsd_arm64.sasm_darwin_amd64.sasm_darwin_arm.sasm_darwin_arm64.sasm_dragonfly_amd64.sasm_freebsd_386.sasm_freebsd_amd64.sasm_freebsd_arm.sasm_freebsd_arm64.sasm_linux_386.sasm_linux_amd64.sasm_linux_arm.sasm_linux_arm64.sasm_linux_mips64x.sasm_linux_mipsx.sasm_linux_ppc64x.sasm_linux_riscv64.sasm_linux_s390x.sasm_netbsd_386.sasm_netbsd_arm64.sasm_openbsd_386.sasm_openbsd_arm.sasm_openbsd_arm64.sasm_openbsd_mips64.sasm_solaris_amd64.sasm_zos_s390x.scap_freebsd.goconstants.godev_aix_ppc.godev_aix_ppc64.godev_zos.godirent.goendian_big.goendian_little.goenv_unix.goepoll_zos.gofcntl.gofcntl_linux_32bit.gofdset.gofstatfs_zos.gogccgo.gogccgo_linux_amd64.goioctl.goioctl_linux.goioctl_zos.gomkall.shmkerrors.shpagesize_unix.goptrace_darwin.goptrace_ios.gorace.gorace0.goreaddirent_getdents.goreaddirent_getdirentries.gosockcmsg_unix.gosockcmsg_unix_other.gostr.gosyscall.gosyscall_aix.gosyscall_aix_ppc.gosyscall_aix_ppc64.gosyscall_bsd.gosyscall_darwin.1_12.gosyscall_darwin.1_13.gosyscall_darwin.gosyscall_darwin_386.gosyscall_darwin_amd64.gosyscall_darwin_arm.gosyscall_darwin_arm64.gosyscall_darwin_libSystem.gosyscall_dragonfly.gosyscall_dragonfly_amd64.gosyscall_freebsd.gosyscall_freebsd_386.gosyscall_freebsd_amd64.gosyscall_freebsd_arm.gosyscall_freebsd_arm64.gosyscall_illumos.gosyscall_linux.gosyscall_linux_386.gosyscall_linux_amd64.gosyscall_linux_amd64_gc.gosyscall_linux_arm.gosyscall_linux_arm64.gosyscall_linux_gc.gosyscall_linux_gc_386.gosyscall_linux_gc_arm.gosyscall_linux_gccgo_386.gosyscall_linux_gccgo_arm.gosyscall_linux_mips64x.gosyscall_linux_mipsx.gosyscall_linux_ppc.gosyscall_linux_ppc64x.gosyscall_linux_riscv64.gosyscall_linux_s390x.gosyscall_linux_sparc64.gosyscall_netbsd.gosyscall_netbsd_386.gosyscall_netbsd_amd64.gosyscall_netbsd_arm.gosyscall_netbsd_arm64.gosyscall_openbsd.gosyscall_openbsd_386.gosyscall_openbsd_amd64.gosyscall_openbsd_arm.gosyscall_openbsd_arm64.gosyscall_solaris.gosyscall_solaris_amd64.gosyscall_unix.gosyscall_unix_gc.gosyscall_unix_gc_ppc64x.gosyscall_zos_s390x.gotimestruct.goxattr_bsd.gozerrors_aix_ppc.gozerrors_aix_ppc64.gozerrors_darwin_386.gozerrors_darwin_amd64.gozerrors_darwin_arm.gozerrors_darwin_arm64.gozerrors_dragonfly_amd64.gozerrors_freebsd_386.gozerrors_freebsd_amd64.gozerrors_freebsd_arm.gozerrors_freebsd_arm64.gozerrors_linux.gozerrors_linux_386.gozerrors_linux_amd64.gozerrors_linux_arm.gozerrors_linux_arm64.gozerrors_linux_mips.gozerrors_linux_mips64.gozerrors_linux_mips64le.gozerrors_linux_mipsle.gozerrors_linux_ppc.gozerrors_linux_ppc64.gozerrors_linux_ppc64le.gozerrors_linux_riscv64.gozerrors_linux_s390x.gozerrors_linux_sparc64.gozerrors_netbsd_386.gozerrors_netbsd_amd64.gozerrors_netbsd_arm.gozerrors_netbsd_arm64.gozerrors_openbsd_386.gozerrors_openbsd_amd64.gozerrors_openbsd_arm.gozerrors_openbsd_arm64.gozerrors_openbsd_mips64.gozerrors_solaris_amd64.gozerrors_zos_s390x.gozptrace_armnn_linux.gozptrace_mipsnn_linux.gozptrace_mipsnnle_linux.gozptrace_x86_linux.gozsyscall_aix_ppc.gozsyscall_aix_ppc64.gozsyscall_aix_ppc64_gc.gozsyscall_aix_ppc64_gccgo.gozsyscall_darwin_386.1_13.gozsyscall_darwin_386.gozsyscall_darwin_amd64.1_13.gozsyscall_darwin_amd64.gozsyscall_darwin_arm.1_13.gozsyscall_darwin_arm.gozsyscall_darwin_arm64.1_13.gozsyscall_darwin_arm64.gozsyscall_dragonfly_amd64.gozsyscall_freebsd_386.gozsyscall_freebsd_amd64.gozsyscall_freebsd_arm.gozsyscall_freebsd_arm64.gozsyscall_illumos_amd64.gozsyscall_linux.gozsyscall_linux_386.gozsyscall_linux_amd64.gozsyscall_linux_arm.gozsyscall_linux_arm64.gozsyscall_linux_mips.gozsyscall_linux_mips64.gozsyscall_linux_mips64le.gozsyscall_linux_mipsle.gozsyscall_linux_ppc.gozsyscall_linux_ppc64.gozsyscall_linux_ppc64le.gozsyscall_linux_riscv64.gozsyscall_linux_s390x.gozsyscall_linux_sparc64.gozsyscall_netbsd_386.gozsyscall_netbsd_amd64.gozsyscall_netbsd_arm.gozsyscall_netbsd_arm64.gozsyscall_openbsd_386.gozsyscall_openbsd_amd64.gozsyscall_openbsd_arm.gozsyscall_openbsd_arm64.gozsyscall_openbsd_mips64.gozsyscall_solaris_amd64.gozsyscall_zos_s390x.gozsysctl_openbsd_386.gozsysctl_openbsd_amd64.gozsysctl_openbsd_arm.gozsysctl_openbsd_arm64.gozsysctl_openbsd_mips64.gozsysnum_darwin_386.gozsysnum_darwin_amd64.gozsysnum_darwin_arm.gozsysnum_darwin_arm64.gozsysnum_dragonfly_amd64.gozsysnum_freebsd_386.gozsysnum_freebsd_amd64.gozsysnum_freebsd_arm.gozsysnum_freebsd_arm64.gozsysnum_linux_386.gozsysnum_linux_amd64.gozsysnum_linux_arm.gozsysnum_linux_arm64.gozsysnum_linux_mips.gozsysnum_linux_mips64.gozsysnum_linux_mips64le.gozsysnum_linux_mipsle.gozsysnum_linux_ppc.gozsysnum_linux_ppc64.gozsysnum_linux_ppc64le.gozsysnum_linux_riscv64.gozsysnum_linux_s390x.gozsysnum_linux_sparc64.gozsysnum_netbsd_386.gozsysnum_netbsd_amd64.gozsysnum_netbsd_arm.gozsysnum_netbsd_arm64.gozsysnum_openbsd_386.gozsysnum_openbsd_amd64.gozsysnum_openbsd_arm.gozsysnum_openbsd_arm64.gozsysnum_openbsd_mips64.gozsysnum_zos_s390x.goztypes_aix_ppc.goztypes_aix_ppc64.goztypes_darwin_386.goztypes_darwin_amd64.goztypes_darwin_arm.goztypes_darwin_arm64.goztypes_dragonfly_amd64.goztypes_freebsd_386.goztypes_freebsd_amd64.goztypes_freebsd_arm.goztypes_freebsd_arm64.goztypes_illumos_amd64.goztypes_linux.goztypes_linux_386.goztypes_linux_amd64.goztypes_linux_arm.goztypes_linux_arm64.goztypes_linux_mips.goztypes_linux_mips64.goztypes_linux_mips64le.goztypes_linux_mipsle.goztypes_linux_ppc.goztypes_linux_ppc64.goztypes_linux_ppc64le.goztypes_linux_riscv64.goztypes_linux_s390x.goztypes_linux_sparc64.goztypes_netbsd_386.goztypes_netbsd_amd64.goztypes_netbsd_arm.goztypes_netbsd_arm64.goztypes_openbsd_386.goztypes_openbsd_amd64.goztypes_openbsd_arm.goztypes_openbsd_arm64.goztypes_openbsd_mips64.goztypes_solaris_amd64.goztypes_zos_s390x.go
windows
term
text
encoding
simplifiedchinese
internal
language
language
secure
unicode
xerrors
gopkg.in
k8s.io
klog
87
vendor/github.com/prometheus/procfs/proc_limits.go
generated
vendored
87
vendor/github.com/prometheus/procfs/proc_limits.go
generated
vendored
@ -26,55 +26,55 @@ import (
|
||||
// http://man7.org/linux/man-pages/man2/getrlimit.2.html.
|
||||
type ProcLimits struct {
|
||||
// CPU time limit in seconds.
|
||||
CPUTime int64
|
||||
CPUTime uint64
|
||||
// Maximum size of files that the process may create.
|
||||
FileSize int64
|
||||
FileSize uint64
|
||||
// Maximum size of the process's data segment (initialized data,
|
||||
// uninitialized data, and heap).
|
||||
DataSize int64
|
||||
DataSize uint64
|
||||
// Maximum size of the process stack in bytes.
|
||||
StackSize int64
|
||||
StackSize uint64
|
||||
// Maximum size of a core file.
|
||||
CoreFileSize int64
|
||||
CoreFileSize uint64
|
||||
// Limit of the process's resident set in pages.
|
||||
ResidentSet int64
|
||||
ResidentSet uint64
|
||||
// Maximum number of processes that can be created for the real user ID of
|
||||
// the calling process.
|
||||
Processes int64
|
||||
Processes uint64
|
||||
// Value one greater than the maximum file descriptor number that can be
|
||||
// opened by this process.
|
||||
OpenFiles int64
|
||||
OpenFiles uint64
|
||||
// Maximum number of bytes of memory that may be locked into RAM.
|
||||
LockedMemory int64
|
||||
LockedMemory uint64
|
||||
// Maximum size of the process's virtual memory address space in bytes.
|
||||
AddressSpace int64
|
||||
AddressSpace uint64
|
||||
// Limit on the combined number of flock(2) locks and fcntl(2) leases that
|
||||
// this process may establish.
|
||||
FileLocks int64
|
||||
FileLocks uint64
|
||||
// Limit of signals that may be queued for the real user ID of the calling
|
||||
// process.
|
||||
PendingSignals int64
|
||||
PendingSignals uint64
|
||||
// Limit on the number of bytes that can be allocated for POSIX message
|
||||
// queues for the real user ID of the calling process.
|
||||
MsqqueueSize int64
|
||||
MsqqueueSize uint64
|
||||
// Limit of the nice priority set using setpriority(2) or nice(2).
|
||||
NicePriority int64
|
||||
NicePriority uint64
|
||||
// Limit of the real-time priority set using sched_setscheduler(2) or
|
||||
// sched_setparam(2).
|
||||
RealtimePriority int64
|
||||
RealtimePriority uint64
|
||||
// Limit (in microseconds) on the amount of CPU time that a process
|
||||
// scheduled under a real-time scheduling policy may consume without making
|
||||
// a blocking system call.
|
||||
RealtimeTimeout int64
|
||||
RealtimeTimeout uint64
|
||||
}
|
||||
|
||||
const (
|
||||
limitsFields = 3
|
||||
limitsFields = 4
|
||||
limitsUnlimited = "unlimited"
|
||||
)
|
||||
|
||||
var (
|
||||
limitsDelimiter = regexp.MustCompile(" +")
|
||||
limitsMatch = regexp.MustCompile(`(Max \w+\s{0,1}?\w*\s{0,1}\w*)\s{2,}(\w+)\s+(\w+)`)
|
||||
)
|
||||
|
||||
// NewLimits returns the current soft limits of the process.
|
||||
@ -96,46 +96,49 @@ func (p Proc) Limits() (ProcLimits, error) {
|
||||
l = ProcLimits{}
|
||||
s = bufio.NewScanner(f)
|
||||
)
|
||||
|
||||
s.Scan() // Skip limits header
|
||||
|
||||
for s.Scan() {
|
||||
fields := limitsDelimiter.Split(s.Text(), limitsFields)
|
||||
//fields := limitsMatch.Split(s.Text(), limitsFields)
|
||||
fields := limitsMatch.FindStringSubmatch(s.Text())
|
||||
if len(fields) != limitsFields {
|
||||
return ProcLimits{}, fmt.Errorf(
|
||||
"couldn't parse %s line %s", f.Name(), s.Text())
|
||||
return ProcLimits{}, fmt.Errorf("couldn't parse %q line %q", f.Name(), s.Text())
|
||||
}
|
||||
|
||||
switch fields[0] {
|
||||
switch fields[1] {
|
||||
case "Max cpu time":
|
||||
l.CPUTime, err = parseInt(fields[1])
|
||||
l.CPUTime, err = parseUint(fields[2])
|
||||
case "Max file size":
|
||||
l.FileSize, err = parseInt(fields[1])
|
||||
l.FileSize, err = parseUint(fields[2])
|
||||
case "Max data size":
|
||||
l.DataSize, err = parseInt(fields[1])
|
||||
l.DataSize, err = parseUint(fields[2])
|
||||
case "Max stack size":
|
||||
l.StackSize, err = parseInt(fields[1])
|
||||
l.StackSize, err = parseUint(fields[2])
|
||||
case "Max core file size":
|
||||
l.CoreFileSize, err = parseInt(fields[1])
|
||||
l.CoreFileSize, err = parseUint(fields[2])
|
||||
case "Max resident set":
|
||||
l.ResidentSet, err = parseInt(fields[1])
|
||||
l.ResidentSet, err = parseUint(fields[2])
|
||||
case "Max processes":
|
||||
l.Processes, err = parseInt(fields[1])
|
||||
l.Processes, err = parseUint(fields[2])
|
||||
case "Max open files":
|
||||
l.OpenFiles, err = parseInt(fields[1])
|
||||
l.OpenFiles, err = parseUint(fields[2])
|
||||
case "Max locked memory":
|
||||
l.LockedMemory, err = parseInt(fields[1])
|
||||
l.LockedMemory, err = parseUint(fields[2])
|
||||
case "Max address space":
|
||||
l.AddressSpace, err = parseInt(fields[1])
|
||||
l.AddressSpace, err = parseUint(fields[2])
|
||||
case "Max file locks":
|
||||
l.FileLocks, err = parseInt(fields[1])
|
||||
l.FileLocks, err = parseUint(fields[2])
|
||||
case "Max pending signals":
|
||||
l.PendingSignals, err = parseInt(fields[1])
|
||||
l.PendingSignals, err = parseUint(fields[2])
|
||||
case "Max msgqueue size":
|
||||
l.MsqqueueSize, err = parseInt(fields[1])
|
||||
l.MsqqueueSize, err = parseUint(fields[2])
|
||||
case "Max nice priority":
|
||||
l.NicePriority, err = parseInt(fields[1])
|
||||
l.NicePriority, err = parseUint(fields[2])
|
||||
case "Max realtime priority":
|
||||
l.RealtimePriority, err = parseInt(fields[1])
|
||||
l.RealtimePriority, err = parseUint(fields[2])
|
||||
case "Max realtime timeout":
|
||||
l.RealtimeTimeout, err = parseInt(fields[1])
|
||||
l.RealtimeTimeout, err = parseUint(fields[2])
|
||||
}
|
||||
if err != nil {
|
||||
return ProcLimits{}, err
|
||||
@ -145,13 +148,13 @@ func (p Proc) Limits() (ProcLimits, error) {
|
||||
return l, s.Err()
|
||||
}
|
||||
|
||||
func parseInt(s string) (int64, error) {
|
||||
func parseUint(s string) (uint64, error) {
|
||||
if s == limitsUnlimited {
|
||||
return -1, nil
|
||||
return 18446744073709551615, nil
|
||||
}
|
||||
i, err := strconv.ParseInt(s, 10, 64)
|
||||
i, err := strconv.ParseUint(s, 10, 64)
|
||||
if err != nil {
|
||||
return 0, fmt.Errorf("couldn't parse value %s: %s", s, err)
|
||||
return 0, fmt.Errorf("couldn't parse value %q: %w", s, err)
|
||||
}
|
||||
return i, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user