debug

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "v0.0.1"

Variables

View Source
var MeridioVersion = "(unknown)"

Functions

This section is empty.

Types

type Export

type Export struct {
	// Version represents the version of the Export type.
	Version        string `json:"version"`
	MeridioVersion string `json:"meridio-version"`
	// UnixTime represents the time at which the info has been exported.
	UnixTime             int64               `json:"unix-time"`
	NetworkInterfaces    []*NetworkInterface `json:"network-interfaces"`
	Rules                []*Rule             `json:"rules"`
	Routes               []*Route            `json:"route"`
	Neighbors            []*Neighbor         `json:"neighbors"`
	System               *System             `json:"system"`
	EnvironmentVariables []string            `json:"environment-variables"`
}

func Collect

func Collect() *Export

func (*Export) String

func (e *Export) String() string

type Neighbor

type Neighbor struct {
	IP             string `json:"ip"`
	Mac            string `json:"mac"`
	State          string `json:"state"`
	InterfaceIndex int    `json:"interface-index"`
}

type NetworkInterface

type NetworkInterface struct {
	Index       int         `json:"index"`
	Name        string      `json:"name"`
	Mac         string      `json:"mac"`
	IPs         []string    `json:"ips"`
	MTU         int         `json:"mtu"`
	Up          bool        `json:"up"`
	MasterIndex int         `json:"master-index"`
	Statistics  *Statistics `json:"statistics"`
}

type Route

type Route struct {
	Table          int      `json:"table"`
	InterfaceIndex int      `json:"interface-index"`
	Destination    string   `json:"destination"`
	Nexthops       []string `json:"nexthops"`
	Gateway        string   `json:"gateway"`
	Source         string   `json:"source"`
}

type Rule

type Rule struct {
	Table       int    `json:"table"`
	Priority    int    `json:"priority"`
	Mark        int    `json:"mark"`
	Source      string `json:"source"`
	Destination string `json:"destination"`
}

type Statistics

type Statistics struct {
	RxPackets uint64 `json:"rx-packets"`
	TxPackets uint64 `json:"tx-packets"`
	RxBytes   uint64 `json:"rx-bytes"`
	TxBytes   uint64 `json:"tx-bytes"`
	RxErrors  uint64 `json:"rx-errors"`
	TxErrors  uint64 `json:"tx-errors"`
	RxDropped uint64 `json:"rx-dropped"`
	TxDropped uint64 `json:"tx-dropped"`
}

type System

type System struct {
	CPUInfo  []cpu.InfoStat `json:"cpu-info"`
	HostInfo *host.InfoStat `json:"host-info"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳