package nfacct
import "k8s.io/kubernetes/pkg/proxy/util/nfacct"
Index ¶
Constants ¶
const MaxLength = 31
MaxLength represents the maximum length allowed for the name in a nfacct counter.
Variables ¶
var ErrNameExceedsMaxLength = fmt.Errorf("object name exceeds the maximum allowed length of %d characters", MaxLength)
Types ¶
type Counter ¶
Counter represents a nfacct accounting object.
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 nfacct counters, it could receive all counters or a subset of them with an unix.EINTR error. List() ([]*Counter, error) }
Interface is an injectable interface for running nfacct commands.
func New ¶
New returns a new Interface. If the netfilter_nfacct subsystem is not available in the kernel it will return error.
Source Files ¶
handler.go nfacct.go nfacct_linux.go
- Version
- v1.33.0 (latest)
- Published
- Apr 23, 2025
- Platform
- linux/amd64
- Imports
- 11 packages
- Last checked
- 3 hours ago –
Tools for package owners.