nlink

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NetworkAttachements = []string{"bond0.100", "bond0.102", "bond0.103", "ens2f0", "ens2f1"}

NetworkAttachements variable

Functions

This section is empty.

Types

type Link struct {
	Name         string
	MTU          int
	HardwareAddr string
	OperState    string
	Parent       *Link
	Child        *Link
	Vfs          []netlink.VfInfo
}

Link struct

type NLink struct {
	Links map[string]*Link
	// contains filtered or unexported fields
}

NLink struct holds the structure

func NewNLink(opts ...Option) (*NLink, error)

NewNLink function defines a new lldptopo

func (*NLink) ListAndWatch

func (nl *NLink) ListAndWatch() error

ListAndWatch function

func (nl *NLink) ParseLinks() error

ParseLinks function

func (*NLink) Run

func (nl *NLink) Run()

Run the loop to report what is going on, and waiting for interrupt to exit clean.

func (*NLink) TimeoutLoop

func (nl *NLink) TimeoutLoop()

TimeoutLoop runs timeout loop until the program stops

type Option

type Option func(nl *NLink)

Option struct

func WithDebug

func WithDebug(d bool) Option

WithDebug function

func WithTimeout

func WithTimeout(dur time.Duration) Option

WithTimeout function

Jump to

Keyboard shortcuts

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