collect

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatMask

func FormatMask(mask net.IPMask) string

func Gateway

func Gateway() (net.IP, error)

func GetIPForInterface

func GetIPForInterface(interfaceName string) (ipAddress *net.IPNet, err error)

func GetPfSenseVersion

func GetPfSenseVersion() string

func Network

func Network() ([]inform.Interface, error)

func Request

func Request(address string, version string) (inform.Inform, error)

func RequestFromPfsense

func RequestFromPfsense(address string, version string, pfsense pfconf.Configuration, translation PfSenseTranslationTable, speedtest *inform.SpeedTestStatus) (inform.Inform, error)

func SysStats

func SysStats() (inform.SysStats, error)

Types

type InterfaceMedia

type InterfaceMedia struct {
	Speed      uint64
	FullDuplex bool
}

func GetInterfaceMedia

func GetInterfaceMedia(iface string) (InterfaceMedia, error)

type PfSenseTranslation

type PfSenseTranslation struct {
	Wan  TranslatedInterface
	Wan2 TranslatedInterface
	Lan  TranslatedInterface
	Uid  TranslatedInterface
}

type PfSenseTranslationTable

type PfSenseTranslationTable struct {
	Wan  string `json:"wan"`
	Wan2 string `json:"wan2,omitempty"`
	Lan  string `json:"lan"`
	Uid  string `json:"uid,omitempty"`
}

type TranslatedInterface

type TranslatedInterface struct {
	Physical   inform.Interface
	Pfsense    pfconf.Interface
	UnifiName  string
	UnifiLabel string
}

Jump to

Keyboard shortcuts

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