network

package
v0.0.0-...-28c030c Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollectMetricsForHost

func CollectMetricsForHost(ctx context.Context, path, prefix string, labelNames, labelValues []string, cc *collector.CollectorContext) error

CollectMetricsForHost collects net metrics for a specific Host

func CollectMetricsForVM

func CollectMetricsForVM(ctx context.Context, path, prefix string, labelNames, labelValues []string, cc *collector.CollectorContext) error

CollectMetricsForVM collects net metrics for a specific VM

Types

type HostNics

type HostNics struct {
	Nics []Nic `xml:"host_nic"`
}

HostNics is a collection of NICs of a host

type Nic

type Nic struct {
	ID   string `xml:"id,attr"`
	Name string `xml:"name"`
	Mac  struct {
		Address string `xml:"address"`
	} `xml:"mac"`
}

Nic represents the network interface card resource

type VMNics

type VMNics struct {
	Nics []Nic `xml:"nic"`
}

VMNics is a collection of NICs of a VM

Jump to

Keyboard shortcuts

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