system

package
v0.0.0-...-4d12b9b Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2026 License: AGPL-3.0 Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	SYSTEM_RESERVED_MEMORY = 1 * 1000
)

Variables

This section is empty.

Functions

func BalanceMemory

func BalanceMemory(services []ServiceConfig, totalSystemMemory int) (map[string]*ServiceConfig, error)

func CheckCPU

func CheckCPU(cores int) error

func CheckDisk

func CheckDisk(size uint64) error

func CheckDistro

func CheckDistro() (string, error)

func CheckMem

func CheckMem(size uint64) error

func GetOddValue

func GetOddValue(value int) int

func InstallTools

func InstallTools(distro string) error

func PrepareKernel

func PrepareKernel() error

func PrepareSystem

func PrepareSystem(distro string) error

func ValidateMemoryAllocation

func ValidateMemoryAllocation(rsrcs map[string]*ServiceConfig, services []ServiceConfig, totalSystemMemory int) error

ValidateMemoryAllocation checks a persisted allocation against the service contract. totalSystemMemory is the raw system total, the same contract BalanceMemory takes.

func VerifyAirGapPrerequisites

func VerifyAirGapPrerequisites() error

Types

type ServiceConfig

type ServiceConfig struct {
	Name           string
	Priority       int
	AssignedMemory int
	MinMemory      int
	MaxMemory      int
}

Jump to

Keyboard shortcuts

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