Documentation ¶
Overview ¶
Package quota provides access to Linux quota netlink notifications.
Quota notifications occur when a user or group's disk quota is exceeded, or when disk usage falls below a given quota.
For more information on quotas, please see https://www.kernel.org/doc/Documentation/filesystems/quota.txt.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
A Client provides access to Linux kobject userspace events. Clients are safe for concurrent use.
func (*Client) Receive ¶
func (c *Client) Receive() (*Notification, error)
Receive waits until a quota netlink notification is triggered, and then returns the Notification.
type Notification ¶
type Notification struct { Type Type ID int Warning Warning DeviceMajor int DeviceMinor int CausedID int }
A Notification is a disk quota notification.
type Warning ¶
type Warning int
A Warning is an individual event which caused a Notification to be sent.
const ( None Warning = 0 InodeHard Warning = 1 InodeSoftLong Warning = 2 InodeSoft Warning = 3 BlockHard Warning = 4 BlockSoftLong Warning = 5 BlockSoft Warning = 6 InodeHardBelow Warning = 7 InodeSoftBelow Warning = 8 BlockHardBelow Warning = 9 BlockSoftBelow Warning = 10 )
Possible Warning values. See the Linux quota documentation for details.