Versions in this module Expand all Collapse all v0 v0.22.1 Nov 22, 2026 v0.22.0 Nov 21, 2026 v0.21.0 Nov 21, 2026 Changes in this version + const LogPublishMaxPerSec + const LogService + const PF_POLICY_CURRENT + const PF_POLICY_PLANNED + const PF_SELECTOR_KIND_VENDOR_REGEXP + const PF_SELECTOR_VENDOR_REGEXP_DEFAULT + var ErrPlanRequired = errors.New("pf-plan required by not available") + var GByte = 1073741824 + var MByte = 1024000 + func ApplyPfConfigs(pfConfigs *[]PfConfig) []error — darwin/amd64, linux/amd64 + func BusTrimmed(address string) string + func DoesFileExist(filename string) bool + func Driver(address string) string — darwin/amd64, linux/amd64 + func GenerateMac() net.HardwareAddr + func GetHostID() (string, error) — darwin/amd64, linux/amd64 + func GetHostname() (string, error) + func GetKernelCmdline() (string, error) — darwin/amd64, linux/amd64 + func GetPciDeviceClass(address string) (string, error) — darwin/amd64, linux/amd64 + func GetPciDeviceDevice(address string) (string, error) — darwin/amd64, linux/amd64 + func GetPciDeviceVendor(address string) (string, error) — darwin/amd64, linux/amd64 + func GetPfsMap() (map[string]*Pf, error) + func InPfKindList(file string) bool + func InterfaceNameFromAddress(address string) string — darwin/amd64, linux/amd64 + func IommuGroup(address string) string — darwin/amd64, linux/amd64 + func IsAllocated(allocations []string, iommuGroup string) bool — darwin/amd64, linux/amd64 + func IsEthernet(address string) bool + func IsPf(address string) bool — darwin/amd64, linux/amd64 + func IsVf(address string) bool + func IsVfio(address string) bool — darwin/amd64, linux/amd64 + func PopulateVfIndexes(pf *Pf) error — darwin/amd64, linux/amd64 + func ReadFileInt(filename string) (int, error) + func ReadFileString(filename string) (string, error) + func SetNumVfs(address string, num int) error — darwin/amd64, linux/amd64 + func UnbindDriver(vfAddress string) error — darwin/amd64, linux/amd64 + func VfioAllocations() ([]string, error) — darwin/amd64, linux/amd64 + func WriteFile(path string, data []byte) error + type Address struct + Bus string + Domain string + Function string + Slot string + func FromNetString(address string) *Address + func FromString(address string) *Address + func (addr *Address) String() string + type Agent struct + Config *AgentConfig + ConfigLocation string + Messenger *messenger.Client + Supervisor *supervisor.Supervisor + func NewAgent(config *AgentConfig) (*Agent, error) + func (a *Agent) ApplyPfConfigs() + func (a *Agent) SetConfigLocation(location string) + func (a *Agent) SignalAndWaitAllClosed() + func (a *Agent) Start() + type AgentConfig struct + AccountID string + CA pki.Certificate + Certificate pki.Certificate + ControllerURL string + HostID string + JWT string + PfConfigs []PfConfig + PrivateKey pki.PrivateKey + Seed string + func AgentConfigFromFile(filename string) (*AgentConfig, error) + type BusCount struct + Bus string + Count int + type BusCountList []BusCount + func (b BusCountList) Len() int + func (b BusCountList) Less(i, j int) bool + func (b BusCountList) Swap(i, j int) + type DriverInfo struct + DriverVersion string + FirmwareVersion string + Name string + func KernelDeviceDriver(interfaceName string) (DriverInfo, error) + type Host struct + CPUModel string + CPUVendor string + CPUs int + Codename string + Core string + Distribution string + DistributorID string + HostID string + Hostname string + Kernel string + OS string + Pfs Pfs + Platform string + Release string + func GetHost() (*Host, error) + type Pf struct + Address string + BondMember uint16 + Device string + DeviceID string + Driver string + DriverVersion string + File string + FwVersion string + HasIPAddress bool + HasSubinterfaces bool + HostID string + Hostname string + IPAddresses []string + Index int + InterfaceName string + MacAddress string + NumVfs int + TotalVfs int + Vendor string + VendorID string + Vfs Vfs + func GetPf(address string) (Pf, error) + func GetPfByAddress(address string) (*Pf, error) + func GetPfs() ([]*Pf, error) + func PfFromVfAddress(address string) Pf + func VfPf(address string) Pf + func (pf *Pf) Features() (map[string]bool, error) + func (pf *Pf) GetVfsConfig() error + func (pf *Pf) ID() string + func (pf *Pf) IPAddressesJoin() string + func (pf *Pf) LinkSetUp() error + func (pf *Pf) LinkState() (uint32, error) + func (pf *Pf) PopulateLinkAttrs() error + func (pf *Pf) PopulateVfIndexes() error + func (pf *Pf) SetNumVfs(num int) error + func (pf *Pf) SetVfMacAddresses() []error + func (pf *Pf) SetVfMacAddressesNetlink() error + func (pf *Pf) Stats() (map[string]uint64, error) + type PfConfig struct + Address string + NumVfs int + Vfio bool + type PfPolicy struct + MaxVfs bool + NumVfs int + OnReboot bool + PfPlan map[string]map[string]map[string]*Pf + PfSelector *PfSelector + func NewPfPolicy(pfSelectorOpts *PfSelectorOptions, pfPolicyOpts *PfPolicyOptions) (*PfPolicy, error) + func (pfPolicy *PfPolicy) Apply(hostID string) error + func (pfPolicy *PfPolicy) ApplyConcrete(hostID string) (*[]PfConfig, error) + func (pfPolicy *PfPolicy) Plan() error + type PfPolicyOptions struct + MaxVfs bool + NumVfs int + OnReboot bool + type PfSelector struct + Kind string + Selected *map[string][]Pf + VendorRegexp string + func NewPfSelector(options *PfSelectorOptions) (*PfSelector, error) + func (pfSelector *PfSelector) Select(hosts *[]Host) error + func (pfSelector *PfSelector) SelectLocalhost() error + type PfSelectorOptions struct + Kind string + VendorRegexp string + type Pfs []*Pf + type Vf struct + Address string + Allocated bool + Device string + DeviceID string + Driver string + HostDriver string + HostID string + Hostname string + IPAddresses []string + Index int + InterfaceName string + IommuGroup string + MacAddress string + PfAddress string + PfIndex int + Vendor string + VendorID string + func GetVf(address string) (Vf, error) + func (vf *Vf) BindHostDriver() error + func (vf *Vf) BindVfio() error + func (vf *Vf) Bus() string + func (vf *Vf) DeviceIDInt() *big.Int + func (vf *Vf) GetIPAddresses() error + func (vf *Vf) GetMacAddress() error + func (vf *Vf) ID() string + func (vf *Vf) IPAddressesJoin() string + func (vf *Vf) UnbindDriver() error + func (vf *Vf) VendorIDInt() *big.Int + type Vfs []*Vf + func GetVfs() (Vfs, error) + func GetVfsVendor(vendorName string) (Vfs, error) + func (vfs *Vfs) ByPfAddress(pfAddress string) Vfs + func (vfs *Vfs) ByVendors(vendorNames []string) Vfs + func (vfs *Vfs) GetAllocations() error + func (vfs *Vfs) NextVf(vendorName string) *Vf + func (vfs *Vfs) NextVfByPf(pfAddress string) *Vf + func (vfs *Vfs) NumPfs() int