package platform

type System struct{}

type LiveBootSource struct {
	InRAM  bool   `json:"in_ram"`
	Kind   string `json:"kind"`
	Source string `json:"source,omitempty"`
	Device string `json:"device,omitempty"`
}

type LiveMediaRAMState struct {
	LiveBootSource
	State        string `json:"state"`
	Status       string `json:"status"`
	ToramActive  bool   `json:"toram_active,omitempty"`
	CopyPresent  bool   `json:"copy_present,omitempty"`
	CopyComplete bool   `json:"copy_complete,omitempty"`
	CanStartCopy bool   `json:"can_start_copy,omitempty"`
	Message      string `json:"message,omitempty"`
}

type InterfaceInfo struct {
	Name  string
	State string
	IPv4  []string
}

type NetworkInterfaceSnapshot struct {
	Name string
	Up   bool
	IPv4 []string
}

type NetworkSnapshot struct {
	Interfaces    []NetworkInterfaceSnapshot
	DefaultRoutes []string
	ResolvConf    string
}

type ServiceAction string

const (
	ServiceStart   ServiceAction = "start"
	ServiceStop    ServiceAction = "stop"
	ServiceRestart ServiceAction = "restart"
)

type StaticIPv4Config struct {
	Interface string
	Address   string
	Prefix    string
	Gateway   string
	DNS       []string
}

type RemovableTarget struct {
	Device     string `json:"device"`
	FSType     string `json:"fs_type"`
	Size       string `json:"size"`
	Label      string `json:"label"`
	Model      string `json:"model"`
	Mountpoint string `json:"mountpoint"`
}

type ToolStatus struct {
	Name string
	Path string
	OK   bool
}

const (
	NvidiaStressLoaderBuiltin = "builtin"
	NvidiaStressLoaderJohn    = "john"
	NvidiaStressLoaderNCCL    = "nccl"
)

type NvidiaStressOptions struct {
	DurationSec       int
	SizeMB            int
	Loader            string
	GPUIndices        []int
	ExcludeGPUIndices []int
	StaggerSeconds    int
}

func New() *System {
	return &System{}
}
