limit

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxLimits = math.MaxUint32 - 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Limiter

type Limiter interface {
	// NewLimit creates a new limit on provided directory path.
	NewLimit(directory string) (uint32, error)

	// SetLimit sets new limit of capacityBytes on provided limitID.
	SetLimit(limitID uint32, capacityBytes int64) error

	// RemoveLimit removes a limit having limitID.
	RemoveLimit(limitID uint32) error
}

type NoopLimiter

type NoopLimiter struct {
}

func (*NoopLimiter) NewLimit

func (l *NoopLimiter) NewLimit(directory string) (uint32, error)

func (*NoopLimiter) RemoveLimit

func (l *NoopLimiter) RemoveLimit(limitID uint32) error

func (*NoopLimiter) SetLimit

func (l *NoopLimiter) SetLimit(limitID uint32, capacityBytes int64) error

Directories

Path Synopsis
xfs

Jump to

Keyboard shortcuts

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