Documentation
¶
Overview ¶
Package selector defines the PodSelector contract for PD-disaggregated routing. A PodSelector takes the full list of ready pods and returns the chosen prefill pod (may be nil for combined-role routing) and decode pod for a given request.
The DefaultSelector returned by NewDefaultSelector wraps a scoring function supplied by the router; future phases will move the scoring logic here so it can be composed and tested independently of the router.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultSelector ¶
type DefaultSelector struct {
// contains filtered or unexported fields
}
DefaultSelector wraps a SelectFunc as a PodSelector. This lets the router register its existing filterPrefillDecodePods method behind the interface without moving the implementation prematurely.
type PodSelector ¶
type PodSelector interface {
Select(routingCtx *types.RoutingContext, readyPods []*v1.Pod) (prefill *v1.Pod, decode *v1.Pod, err error)
}
PodSelector picks a prefill/decode pod pair from the full ready-pod list. A nil prefill pod signals combined-role routing (decode pod handles both phases).
func NewDefaultSelector ¶
func NewDefaultSelector(fn SelectFunc) PodSelector
NewDefaultSelector returns a PodSelector backed by fn.