File size: 466 Bytes
6a7089a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | package allocation
import "github.com/pinchtab/pinchtab/internal/bridge"
// FCFS (First Come First Served) returns the first running candidate.
// This is the default policy — simple, predictable, deterministic.
type FCFS struct{}
func (f *FCFS) Name() string { return "fcfs" }
func (f *FCFS) Select(candidates []bridge.Instance) (bridge.Instance, error) {
if len(candidates) == 0 {
return bridge.Instance{}, ErrNoCandidates
}
return candidates[0], nil
}
|