sidekick

package
v0.0.0-test Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 5 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGlobalAddrs

func GetGlobalAddrs() map[string]NetIface

func GetNetLinkAttrs

func GetNetLinkAttrs() map[string]NetLinkAttrs

func GetRouteIfaceAddr

func GetRouteIfaceAddr(ip net.IP) (string, *net.IPNet, error)

Return route's link name and ip

Types

type NetAddr

type NetAddr struct {
	IPNet net.IPNet `json:"ipnet"`
	Scope int       `json:"scope"`
}

type NetIface

type NetIface struct {
	Name  string    `json:"name"`
	Type  string    `json:"type"`
	Mtu   int       `json:"mtu"`
	Flags net.Flags `json:"flags"`
	Addrs []NetAddr `json:"addrs"`
}

type NetLinkAttrs

type NetLinkAttrs struct {
	Index     int    `json:"index"`
	Name      string `json:"name"`
	OperState bool   `json:"OperState"`
}

Jump to

Keyboard shortcuts

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