Documentation ¶
Index ¶
Constants ¶
View Source
const MaxLength = 31
MaxLength represents the maximum length allowed for the name in a nfacct counter.
Variables ¶
View Source
var ErrEmptyName = errors.New("object name cannot be empty")
View Source
var ErrNameExceedsMaxLength = fmt.Errorf("object name exceeds the maximum allowed length of %d characters", MaxLength)
View Source
var ErrNotSupported = errors.New("nfacct sub-system not available")
View Source
var ErrObjectAlreadyExists = errors.New("object already exists")
View Source
var ErrObjectNotFound = errors.New("object not found")
View Source
var ErrUnexpected = errors.New("unexpected error")
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface interface { // Ensure checks the existence of a nfacct counter with the provided name and creates it if absent. Ensure(name string) error // Add creates a nfacct counter with the given name, returning an error if it already exists. Add(name string) error // Get retrieves the nfacct counter with the specified name, returning an error if it doesn't exist. Get(name string) (*Counter, error) // List retrieves all nfacct counters. List() ([]*Counter, error) }
Interface is an injectable interface for running nfacct commands.
Click to show internal directories.
Click to hide internal directories.