Consul is a distributed, highly available, and data center aware solution to connect and configure applications across dynamic, distributed infrastructure.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
410 B

//go:build !windows
// +build !windows
package config
import "golang.org/x/sys/unix"
// getrlimit return the max file descriptors allocated by system
// return the number of file descriptors max
func getrlimit() (uint64, error) {
var limit unix.Rlimit
err := unix.Getrlimit(unix.RLIMIT_NOFILE, &limit)
// nolint:unconvert // Rlimit.Cur may not be uint64 on all platforms
return uint64(limit.Cur), err
}