nicmonitor

package
v0.0.0-...-0093c61 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MONITOR_KEEPALIVE_FAIL  uint32 = 1 << 0
	MONITOR_LINKSTATUS_FAIL uint32 = 1 << 1
)

Variables

View Source
var KubeClient *kubernetes.Clientset

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	ListenPort      int
	PullInterval    int
	MonitorInterval int
	StasInterval    int
	MetricsPath     string
	KubeConfigFile  string
}

Configuration contains parameters information.

func ParseFlags

func ParseFlags() (*Configuration, error)

ParseFlags get parameters information.

type Exporter

type Exporter struct {
	Hostname string
	// contains filtered or unexported fields
}

func NewExporter

func NewExporter(cfg *Configuration) *Exporter

NewExporter returns an initialized Exporter.

func (*Exporter) StartNicMetrics

func (e *Exporter) StartNicMetrics()

type Monitor

type Monitor struct {
	// contains filtered or unexported fields
}

func NewNicMonitor

func NewNicMonitor(cfg *Configuration) *Monitor

func (*Monitor) StartNicMonitor

func (m *Monitor) StartNicMonitor()

type NetlinkListener

type NetlinkListener struct {
	// contains filtered or unexported fields
}

func NewNetlinkListener

func NewNetlinkListener() (*NetlinkListener, error)

func (*NetlinkListener) ReadMsgs

func (l *NetlinkListener) ReadMsgs() ([]syscall.NetlinkMessage, error)

Jump to

Keyboard shortcuts

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