Version: v1.7.0 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2021 License: GPL-3.0 Imports: 1 Imported by: 4



Package fdlimit handles file descriptors based on the operating system.

In Klaytn, `levelDB` database in the `database` package is using this package to get current allowance of file descriptors for this process and to raise it as it requires. Because the maximum allowance is different between operating systems, it can be limited by the operating system on which Klaytn runs.



This section is empty.


This section is empty.


func Current

func Current() (int, error)

Current retrieves the number of file descriptors allowed to be opened by this process.

func Maximum

func Maximum() (int, error)

Maximum retrieves the maximum number of file descriptors this process is allowed to request for itself.

func Raise

func Raise(max uint64) (uint64, error)

Raise tries to maximize the file descriptor allowance of this process to the maximum hard-limit allowed by the OS. Returns the size it was set to (may differ from the desired 'max')


This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL