View Source Handoff.Allocator behaviour (Handoff v0.1.0)
Behavior for allocating functions to nodes based on resource requirements.
This module is responsible for determining which nodes should execute which functions, considering their resource requirements and available capabilities.
Link to this section Summary
Callbacks
Allocate functions to nodes based on resource requirements and node capabilities.
Link to this section Callbacks
@callback allocate( functions :: [Handoff.Function.t()], caps :: %{required(node()) => map()} ) :: %{required(term()) => node()}
Allocate functions to nodes based on resource requirements and node capabilities.
parameters
Parameters
functions
: List of functions to allocatecaps
: Map of node capabilities in the format %{node() => capabilities_map}
returns
Returns
A map with function IDs as keys and node assignments as values.