server

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ip, user string, args *Args) *server

Types

type Args

type Args struct {
	Port     uint16
	Password string
	Key      []byte
}

type CPU

type CPU struct {
	Name        string `json:"name"`
	Cores       int    `json:"cores"`
	CoreFreqMin MHz    `json:"core_freq_min_mhz"`
	CoreFreqMax MHz    `json:"core_freq_max_mhz"`
	Threads     int    `json:"threads"`
}

type Disk

type Disk struct {
	Model     string `json:"model"`
	Name      string `json:"name"`
	Serial    string `json:"serial"`
	Size      int    `json:"size"`
	Type      string `json:"type"`
	Transport string `json:"tran"`
	WWN       string `json:"wwn"`
}

func (*Disk) Device

func (d *Disk) Device() string

type Ethernet

type Ethernet struct {
	Device string `json:"device"`
	MAC    string `json:"mac"`
	Speed  Mbps   `json:"speed_mbps"`
}

type GigaByte

type GigaByte int

type MHz

type MHz int

type Machine

type Machine struct {
	Arch        string   `json:"arch"`
	IPv4Network Network  `json:"ipv4_network"`
	Hostname    string   `json:"hostname"`
	Disks       []Disk   `json:"disks"`
	CPU         CPU      `json:"cpu"`
	Memory      Memory   `json:"memory"`
	System      System   `json:"system"`
	Ethernet    Ethernet `json:"ethernet"`
}

type Mbps

type Mbps int

type Memory

type Memory struct {
	Size    GigaByte `json:"size_gb"`
	Modules []string `json:"modules"`
}

type Network

type Network struct {
	IP      string `json:"ip"`
	Netmask string `json:"netmask"`
	Gateway string `json:"gateway"`
}

type System added in v0.0.17

type System struct {
	Manufacturer string `json:"manufacturer"`
	ProductName  string `json:"product_name"`
	Version      string `json:"version"`
	Family       string `json:"family"`
	UUID         string `json:"uuid"`
	SerialNumber string `json:"serial_number"`
	SKUNumber    string `json:"sku_number"`
}

Jump to

Keyboard shortcuts

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