system

package
v0.0.0-...-205da4a Latest Latest
Warning

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

Go to latest
Published: May 26, 2025 License: MIT Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BootID

func BootID() (string, error)

BootID return machine boot id from '/proc/sys/kernel/random/boot_id', and which is different for each reboot

func Bridges

func Bridges(ctx context.Context) ([]*net.IPNet, error)

func GetPublicIPv4

func GetPublicIPv4() string

func GetPublicIPv6

func GetPublicIPv6() string

func GetTotalMemory

func GetTotalMemory() (total int64)

func GetUptime

func GetUptime() int64

func HostInfo

func HostInfo() (hostInfo *apis.HostInfo, err error)

func Hostname

func Hostname() (hostname string)

Hostname return host's name of chameleon service running on

func KernelRelease

func KernelRelease() (architecture, release string, err error)

func MachineID

func MachineID() (string, error)

MachineID returns content from file '/etc/machine-id' in uuid format

func Platform

func Platform() (platform, version string, err error)

func ProductUUID

func ProductUUID() (string, error)

ProductUUID returns ACES product uuid, which shares common cache file '/etc/.aces_uuid' or file provided by ENV 'CHAMELEON_HOST_PROCFS', and product uuid will be changed if the specified file updated

func TestConnection

func TestConnection(address ...string) bool

func UUID

func UUID() (string, error)

UUID returns system uuid from file '/sys/class/dmi/id/product_uuid'

Types

type MountInfo

type MountInfo struct {
	MountID        int64
	ParentID       int64
	Device         string
	Root           string
	MountPoint     string
	Options        string
	OptionalFields []string
	FsType         string
	Source         string
	SuperOptions   string
}

func GetMounts

func GetMounts() ([]*MountInfo, error)

type Network

type Network struct {
	// contains filtered or unexported fields
}

func (*Network) IPv4

func (network *Network) IPv4() string

func (*Network) IPv4s

func (network *Network) IPv4s() []string

func (*Network) IPv6

func (network *Network) IPv6() string

func (*Network) IPv6s

func (network *Network) IPv6s() []string

func (*Network) IsActive

func (network *Network) IsActive() bool

func (*Network) Mac

func (network *Network) Mac() string

func (*Network) Name

func (network *Network) Name() string

func (*Network) String

func (network *Network) String() string

type Networks

type Networks []*Network

func GetNetworks

func GetNetworks() Networks

func (Networks) First

func (networks Networks) First() *Network

func (Networks) IPv4

func (networks Networks) IPv4() string

func (Networks) IPv6

func (networks Networks) IPv6() string

func (Networks) Len

func (networks Networks) Len() int

func (Networks) String

func (networks Networks) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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