kubernetesk8s.io/kubernetes/pkg/proxy/util/nfacct Index | Files

package nfacct

import "k8s.io/kubernetes/pkg/proxy/util/nfacct"

Index

Types

type Counter

type Counter struct {
	Name    string
	Packets uint64
	Bytes   uint64
}

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 all nfacct counters.
	List() ([]*Counter, error)
}

Interface is an injectable interface for running nfacct commands.

func New

func New() (Interface, error)

Source Files

nfacct.go nfacct_others.go

Version
v1.31.8
Published
Apr 22, 2025
Platform
js/wasm
Imports
2 packages
Last checked
17 minutes ago

Tools for package owners.