Public entry point for this node's resource budget. Thin facade over
Hyper.Node.Budget.Hard, the per-node accounting GenServer supervised by
Hyper.Node.Budget.Supervisor.
Summary
Functions
Authoritatively confirm this node can run spec, reserving its budget for the
lifetime of owner. Live soft-load check first, then an atomic hard reserve.
Can this node run the given vm spec? :ok if yes, {:error, reason} otherwise.
Reserve the spec's budget, run callable, and release the budget afterwards.
Functions
@spec admit(Hyper.Vm.Instance.Spec.t(), pid()) :: :ok | {:error, term()}
Authoritatively confirm this node can run spec, reserving its budget for the
lifetime of owner. Live soft-load check first, then an atomic hard reserve.
@spec can_run(Hyper.Vm.Instance.Spec.t()) :: :ok | {:error, term()}
Can this node run the given vm spec? :ok if yes, {:error, reason} otherwise.
@spec with_budget(Hyper.Vm.Instance.Spec.t(), (-> result)) :: result | {:error, term()} when result: var
Reserve the spec's budget, run callable, and release the budget afterwards.