sparkles: state api sdk (#262)

*  Add state api

This is related to https://github.com/kairos-io/kairos/issues/34.

Starts to unify the API to retrieve the state in the sdk to have a common place to query system status information.

* 🤖 Add test

* Update go.mod

* ⚙️ Fine-tune detection of partitions

* 🤖 Add more fine-grained tests

* 🎨 Add /dev/ to partition name

* 🤖 Fixup tests

* ⚙️ Remount accessors

*  Add state partition to cloud-init paths

* 📝 Upper case Kairos in motd

* 🎨 Add mounts sdk

* 🎨 Set grub options via SDK

* 🎨 Make it more idiomatic
This commit is contained in:
Ettore Di Giacinto
2022-10-23 20:22:32 +02:00
committed by Itxaka
parent 5aeed0ddd2
commit 696e87bbee
5 changed files with 264 additions and 0 deletions

11
sdk/state/machine.go Normal file
View File

@@ -0,0 +1,11 @@
package state
type Machine struct {
UUID string
BootArgs []string
CloudConfig string
}
type Spec struct {
MachineSpec Machine
}