domain

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2026 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	ID        string
	Hostname  string
	Region    string
	IPAddress string
	Status    NodeStatus

	// Capacity
	TotalVCPU   int
	TotalMemGB  int
	TotalDiskGB int

	// Reported by daemon heartbeat
	UsedVCPU   int
	UsedMemGB  int
	UsedDiskGB int

	LastHeartbeatAt time.Time
	CreatedAt       time.Time
	UpdatedAt       time.Time
}

Node represents a compute node registered with the platform. Nodes are managed by the daemon and reported to the control plane.

func (*Node) AvailableMemGB

func (n *Node) AvailableMemGB() int

AvailableMemGB returns unallocated memory in GB.

func (*Node) AvailableVCPU

func (n *Node) AvailableVCPU() int

AvailableVCPU returns unallocated CPU.

type NodeStatus

type NodeStatus string

NodeStatus reflects the operational state of a physical or virtual node.

const (
	NodeStatusOnline      NodeStatus = "online"
	NodeStatusOffline     NodeStatus = "offline"
	NodeStatusDraining    NodeStatus = "draining"
	NodeStatusMaintenance NodeStatus = "maintenance"
)

Jump to

Keyboard shortcuts

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