network

package
v0.0.0-...-4316413 Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: MIT Imports: 3 Imported by: 15

Documentation

Overview

Package network regroups collecting information about the network interfaces

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Network

type Network struct {
	// IpAddress is the ipv4 address for the host
	IpAddress string
	// IpAddressv6 is the ipv6 address for the host
	IpAddressv6 string
	// MacAddress is the macaddress for the host
	MacAddress string
}

Network holds network metadata about the host

func Get

func Get() (*Network, []string, error)

Get returns a Network struct already initialized, a list of warnings and an error. The method will try to collect as much metadata as possible, an error is returned if nothing could be collected. The list of warnings contains errors if some metadata could not be collected.

func (*Network) Collect

func (network *Network) Collect() (result interface{}, err error)

Collect collects the Network information. Returns an object which can be converted to a JSON or an error if nothing could be collected. Tries to collect as much information as possible.

func (*Network) Name

func (network *Network) Name() string

Name returns the name of the package

Jump to

Keyboard shortcuts

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