Documentation ¶
Index ¶
- func Arch(m remotecommand.Machine, cb ssh.HostKeyCallback) (string, error)
- func CPUCores(m remotecommand.Machine, cb ssh.HostKeyCallback) (int, error)
- func CPUName(m remotecommand.Machine, cb ssh.HostKeyCallback) (string, error)
- func CPUThreads(m remotecommand.Machine, cb ssh.HostKeyCallback) (int, error)
- func Disks(m remotecommand.Machine, cb ssh.HostKeyCallback) ([]totalos.Disk, error)
- func FormatExt4(m remotecommand.Machine, label, uuid, device string, cb ssh.HostKeyCallback) error
- func IPv4(m remotecommand.Machine, cb ssh.HostKeyCallback) (net.IP, error)
- func IPv4Gateway(m remotecommand.Machine, cb ssh.HostKeyCallback) (net.IP, error)
- func IPv4Netmask(m remotecommand.Machine, cb ssh.HostKeyCallback) (net.IP, error)
- func InstallImage(m remotecommand.Machine, isoImageURL, device string, cb ssh.HostKeyCallback) error
- func MAC(m remotecommand.Machine, cb ssh.HostKeyCallback) (string, error)
- func Memory(m remotecommand.Machine, cb ssh.HostKeyCallback) (totalos.GigaByte, error)
- func Reboot(m remotecommand.Machine, cb ssh.HostKeyCallback)
- func SelectStorageDisk(disks []totalos.Disk, systemDisk totalos.Disk) (totalos.Disk, error)
- func SelectSystemDisk(disks []totalos.Disk) (totalos.Disk, error)
- func SetConfigURL(m remotecommand.Machine, configURL, device string, cb ssh.HostKeyCallback) error
- func SoftwareRAIDNotExists(m remotecommand.Machine, cb ssh.HostKeyCallback) error
- func Storage(m remotecommand.Machine, cb ssh.HostKeyCallback) ([]totalos.GigaByte, error)
- func SystemUUID(m remotecommand.Machine, cb ssh.HostKeyCallback) (string, error)
- func WipeFileSystemSignatures(m remotecommand.Machine, cb ssh.HostKeyCallback) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Arch ¶
func Arch(m remotecommand.Machine, cb ssh.HostKeyCallback) (string, error)
Arch returns the machine architecture (see `uname -m`)
func CPUCores ¶
func CPUCores(m remotecommand.Machine, cb ssh.HostKeyCallback) (int, error)
CPUCores returns the amount of real CPU cores
func CPUName ¶
func CPUName(m remotecommand.Machine, cb ssh.HostKeyCallback) (string, error)
CPUName returns the CPU name
func CPUThreads ¶
func CPUThreads(m remotecommand.Machine, cb ssh.HostKeyCallback) (int, error)
CPUThreads returns the amount of CPU threads
func Disks ¶
func Disks(m remotecommand.Machine, cb ssh.HostKeyCallback) ([]totalos.Disk, error)
Disks returns all disks
func FormatExt4 ¶
func FormatExt4(m remotecommand.Machine, label, uuid, device string, cb ssh.HostKeyCallback) error
FormatExt4 formats the full device with one ext4 partition. Sets partition label (default is "storage") and disk UUID (default is "61291e61-291e-6129-1e61-291e61291e00")
func IPv4 ¶
func IPv4(m remotecommand.Machine, cb ssh.HostKeyCallback) (net.IP, error)
IPv4 address of eth0
func IPv4Gateway ¶
func IPv4Gateway(m remotecommand.Machine, cb ssh.HostKeyCallback) (net.IP, error)
IPv4Gateway returns the default gateway IPv4 of eth0
func IPv4Netmask ¶
func IPv4Netmask(m remotecommand.Machine, cb ssh.HostKeyCallback) (net.IP, error)
IPv4Netmask returns the IPv4 netmask of eth0
func InstallImage ¶
func InstallImage(m remotecommand.Machine, isoImageURL, device string, cb ssh.HostKeyCallback) error
InstallImage downloads the raw.xz image URL and writes it to the given device.
func MAC ¶
func MAC(m remotecommand.Machine, cb ssh.HostKeyCallback) (string, error)
MAC returns the address of the ethernet interface
func Memory ¶
func Memory(m remotecommand.Machine, cb ssh.HostKeyCallback) (totalos.GigaByte, error)
Memory returns the amount of RAM
func Reboot ¶
func Reboot(m remotecommand.Machine, cb ssh.HostKeyCallback)
Reboot triggers a reboot. It does not return anything, since the machine should be offline and not be able to have an SSH chat :)
func SelectStorageDisk ¶
SelectStorageDisk finds and returns the biggest available disk which is not the system disk.
func SelectSystemDisk ¶
SelectSystemDisk takes all disks, sorts them by their serial alphabetically and returns the first one. The result is deterministic.
func SetConfigURL ¶ added in v0.0.6
func SetConfigURL(m remotecommand.Machine, configURL, device string, cb ssh.HostKeyCallback) error
Sets talos.config in grub.cfg
func SoftwareRAIDNotExists ¶
func SoftwareRAIDNotExists(m remotecommand.Machine, cb ssh.HostKeyCallback) error
SoftwareRAIDNotExists ensures that there are no software RAID partitions (/dev/md*)
func Storage ¶
func Storage(m remotecommand.Machine, cb ssh.HostKeyCallback) ([]totalos.GigaByte, error)
Storage returns a slice with the gigabytes storage per disk
func SystemUUID ¶
func SystemUUID(m remotecommand.Machine, cb ssh.HostKeyCallback) (string, error)
SystemUUID as defined in SMBIOS data
func WipeFileSystemSignatures ¶
func WipeFileSystemSignatures(m remotecommand.Machine, cb ssh.HostKeyCallback) error
WipeFileSystemSignatures erases all available signatures of all NVMe and SATA drives. It does not shred the data, though!
Types ¶
This section is empty.