package
2.15.3
Repository: https://github.com/kairos-io/kairos-agent.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

CalcFileChecksum opens the given file and returns the sha256 checksum of it.
CheckFailedInstallation checks if the state file if present, and if it is, it will return true and the error with the file content indicating why we should abort the installation.
ChrootedCallback runs the given callback in a chroot environment.
No description provided by the author
ConcatFiles Copies source files to target file using Fs interface.
CopyFile Copies source file to target file using Fs interface.
CosignVerify runs a cosign validation for the give image and given public key.
Copies source file to target file using Fs interface.
CreateSquashFS creates a squash file at destination from a source, with options TODO: Check validity of source maybe?.
FindCommand will search for the command(s) in the options given to find the current command If it cant find it returns the default value give.
FindFileWithPrefix looks for a file in the given path matching one of the given prefixes.
GetDeviceByLabel will try to return the device that matches the given label.
GetSource copies given source to destination, if source is a local path it simply copies files, if source is a remote URL it tries to download URL to destination.
GetTempDir returns the dir for storing related temporal files It will respect TMPDIR and use that if exists, fallback to try the persistent partition if its mounted and finally the default /tmp/ dir suffix is what is appended to the dir name elemental-suffix.
IsHTTPURI returns true if the uri has "http" or "https" scheme, returns false otherwise.
IsLocalURI returns true if the uri has "file" scheme or no scheme and URI is not prefixed with a domain (container registry style).
No description provided by the author
IsUki returns true if the system is running in UKI mode.
IsUkiWithFs checks if the system is running in UKI mode by checking the kernel command line for the rd.immucore.uki flag Uses a v1.Fs interface to allow for testing.
LoadEnvFile will try to parse the file given and return a map with the kye/values.
No description provided by the author
NewCleanStack returns a new stack.
No description provided by the author
ReadPersistentVariables will read a grub env file and parse the values.
Reboot reboots the system afater the given delay (in seconds) time passed.
RunStage will run yip.
RunstageAnalyze.
SetPersistentVariables sets the given vars into the given grubEnvFile for grub to read them.
Shutdown halts the system afater the given delay (in seconds) time passed.
SyncData rsync's source folder contents to a target folder content, both are expected to exist beforehand.
SystemdBootConfReader reads a systemd-boot conf file and returns a map with the key/value pairs TODO: Move this to the sdk with the FS interface.
SystemdBootConfWriter writes a map to a systemd-boot conf file TODO: Move this to the sdk with the FS interface.
UkiBootMode will return where the system is running from, either HDD or RemovableMedia HDD means we are booting from an already installed system RemovableMedia means we are booting from a live media like a CD or USB.
ValidContainerReferece returns true if the given string matches a container registry reference, false otherwise.
ValidTaggedContainerReferece returns true if the given string matches a container registry reference including a tag, false otherwise.

# Constants

No description provided by the author
No description provided by the author

# Structs

Chroot represents the struct that will allow us to run commands inside a given chroot.
Stack is a basic LIFO stack that resizes as needed.
Grub is the struct that will allow us to install grub to the target device.

# Type aliases

No description provided by the author