struct

Sandcube::Capacity

Inherits Struct < Value < Object

Allocatable budgets exclude the OS, runtime overhead, images, builds and logs. Production requires explicit budgets; constructor defaults keep embedded tests simple.

Constructors

new(cpu : Int64 = 64_i64, memory_mb : Int64 = 262144_i64, disk_mb : Int64 = 1048576_i64)
Source

Class methods

from_env
Source

Instance methods

clone
Source
configure(conn)
Source
copy_with(cpu _cpu = @cpu, memory_mb _memory_mb = @memory_mb, disk_mb _disk_mb = @disk_mb)
Source
cpu
disk_mb
memory_mb
reserve(conn, id, cpu, memory, disk)

Called inside the host lock AND the intent transaction. Uncertain cleanup retains its reservation; a process crash cannot make capacity disappear.

Source