Run-local hierarchical credit grants.
Grants reserve finite credits in the parent up front. Reservations in a child spend its grant, sibling transfers move only unused credit, and closing a leaf returns unused credit while retaining consumed work in its parent. The root is the run's atomic budget; ordinary measurements keep that fast path. Scoped credit management is serialized within this run, never globally.
Summary
Functions
Returns a specification to start this module under a supervisor.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec refund(term(), term(), Plexus.Budget.meter(), non_neg_integer()) :: :ok | {:error, term()}
@spec reserve(term(), term(), Plexus.Budget.meter(), non_neg_integer()) :: :ok | {:error, term()}
@spec transfer(term(), term(), term(), Plexus.Budget.meter(), non_neg_integer()) :: :ok | {:error, term()}