AssignmentInput
Everything an assignment policy may look at.
Nebula · Packages/com.1by3.nebula/Runtime/Orchestrator/AssignmentPolicy.cspublic sealed class AssignmentInputEverything an assignment policy may look at. Built by the orchestrator once per pass.
Fields
Baked
public IReadOnlyList<Container> Baked = Array.Empty<Container>();The baked containers, in wire order (Morton order in a partitioned world).
Runtime
public IReadOnlyList<Container> Runtime = Array.Empty<Container>();The runtime containers the control plane currently names.
Eligible
public IList<WorkerInfo> Eligible = Array.Empty<WorkerInfo>();Workers that may receive containers: live, not retiring.
Leases
public IReadOnlyList<LeaseInfo> Leases = Array.Empty<LeaseInfo>();Every lease row.
Occupancy
public IReadOnlyDictionary<string, ContainerLoad> Occupancy = new Dictionary<string, ContainerLoad>();The latest per-container load each worker reported, by container id. Containers nobody reported are absent.
Utilization
public IReadOnlyDictionary<string, float> Utilization = new Dictionary<string, float>();How much of a worker's tick budget each container is costing, by container id: its worker's p90 utilization spread over the containers it leases in proportion to their cost-weighted occupancy (WorkerLoadTracker.Attribute). 0.4 means "four tenths of a tick". Containers nobody reported are absent. This is what the scaler's dry runs add up.
Hints
public IReadOnlyDictionary<string, ContainerHint> Hints = new Dictionary<string, ContainerHint>();What the game says about each container beyond what the mesh can measure, by container id (ContainerHint). The orchestrator merges the baked hints with the ones set while the mesh runs, the runtime value winning. Containers nobody hinted are absent, which reads as ContainerHint.Default.
Cost
public IReadOnlyDictionary<string, ContainerCost> Cost = new Dictionary<string, ContainerCost>();What each container is measured to cost its worker, split into simulation, replication and gateway relay (ContainerCost, docs/cost-telemetry.md). Containers nobody reported are absent. The policies do not read it; the scaler does, to name what makes a hot container hot.
KeepOrder
public bool KeepOrder;The baked order is spatial (a partitioned world) and should be kept when dealing.
Holds
public IReadOnlyDictionary<string, float> Holds = new Dictionary<string, float>();Containers a worker asked not to be rebalanced, by container id, with the seconds each hold still has to run on the orchestrator's clock (NebulaWorker.HoldContainer, docs/cohesion-hints.md D8). Containers nobody holds are absent.
Cohesion
public IReadOnlyList<CohesionGroupInfo> Cohesion = Array.Empty<CohesionGroupInfo>();The entity cohesion groups the mesh is holding (CohesionGroupInfo). Their containers are dealt as one item, exactly like an ContainerHint.AffinityGroup, and are never split.
Methods
IsHeld
public bool IsHeld(string containerId);Whether a container is under a live hold, so moving it now is deferred.
HoldSeconds
public float HoldSeconds(string containerId);How many seconds a container's hold still has to run, or 0 when it is not held.
DropHeldChanges
public int DropHeldChanges(List<KeyValuePair<string, string>> changes);Remove the changes that would move a held container, so a hold defers a rebalance whichever policy computed it. A hold never keeps an orphan where it is: a container with no live owner has to be placed, and the hold is about not being moved, not about staying unowned. Returns how many were dropped.
HintOf
public ContainerHint HintOf(string containerId);The hint for a container, or ContainerHint.Default when nothing was said about it.
OwnerOf
public string OwnerOf(string containerId);The active, eligible owner of a container, or "".