Versions in this module Expand all Collapse all v0 v0.209.1 Nov 8, 2026 v0.209.0 Nov 8, 2026 v0.207.0 Oct 30, 2026 v0.206.0 Oct 29, 2026 Changes in this version + var ErrNoUpstreamRoot = errors.New("modelaffinity: endpoint has no llama-swap root for an /upstream request") + func AwaitModelRoute(ctx context.Context, endpoint, model, route string, deadline time.Time) (string, error) + func AwaitRunSlot(ctx context.Context, base, model string, deadline time.Time) error + func AwaitSeatSlot(ctx context.Context, runs SeatRuns, seat, canonical, selfID string, cap int, ...) error + func AwaitSeatSlotReporting(ctx context.Context, runs SeatRuns, seat, canonical, selfID string, cap int, ...) error + func AwaitUpstream(ctx context.Context, endpoint, model, path string, deadline time.Time) (string, error) + func BlocksLoadFor(info gpulease.Info, pins []string) bool + func BlocksNewRun(info gpulease.Info) bool + func BlocksNewRunFor(info gpulease.Info, pins []string) bool + func CardsHeld(pins []string) (held bool, why string) + func DisarmGPULease() + func EndpointHost(base string, selfNames ...string) string + func GPULeaseDir() string + func HolderUpstreamURL(endpoint, model, path string) (string, error) + func InsideLease(info gpulease.Info) bool + func InspectLease(dir string) gpulease.Info + func IsLeaseRefusal(err error) bool + func IsSeatSlotError(err error) bool + func LegacyInference() bool + func PeekLease(dir string) gpulease.Info + func PinsFor(model string) ([]string, bool) + func ScopeFunc(gpuLockPath, stateDir string) func(gpulease.Info) gpulease.Info + func ScopeInfo(dir string, info gpulease.Info) gpulease.Info + func ScopeLeases(dir string, leases []gpulease.Info) []gpulease.Info + func ScopeToModel(info gpulease.Info, model string) gpulease.Info + func ScopeToPins(info gpulease.Info, pins []string) gpulease.Info + func SeatCapDeadline(ctx context.Context, now time.Time, wall time.Duration, admissionEnd time.Time) time.Time + func SeatCards(model string) []string + func SeatLease(model string) gpulease.Info + func SetCardOrder(order string) + func SetCardTableReader(...) (restore func()) + func SetComfyDir(dir string) + func SetGPULease(lockOverride, stateDir string) error + func SetLegacyInference(on bool) + func SetSeatPins(fn func(model string) ([]string, bool)) + func SetYieldProtect(protect []string) + func SetYieldSeams(s YieldSeams) (restore func()) + func WouldBlockUpstream(ctx context.Context, endpoint, model string) bool + func YieldIfFenced(ctx context.Context, endpoint, model string) (yielded bool, why string) + type LeaseError struct + Base string + Bound time.Duration + Class gpulease.Class + Draining bool + Epoch uint64 + ExpiresAt time.Time + Explain string + HeldFor time.Duration + JobID string + Origin string + PID int + Reason string + Waited time.Duration + Want string + func (e *LeaseError) Error() string + func (e *LeaseError) Unwrap() error + type SeatRuns func(now time.Time, names ...string) []gpuactivity.Run + type SeatSlotError struct + Ahead int + Cap int + Seat string + Waited time.Duration + func (e *SeatSlotError) Error() string + func (e *SeatSlotError) Unwrap() error + type Ticket struct + func Admit(ctx context.Context, base, model string, budget time.Duration) (Ticket, error) + func AdmitOffBox(ctx context.Context, base, model string, budget time.Duration) (Ticket, error) + func (t Ticket) Release() + type WaitError struct + Base string + BatchesAhead int + Bound time.Duration + Held string + InFlight int + Waited time.Duration + Want string + func (e *WaitError) Error() string + func (e *WaitError) Unwrap() error + type YieldSeams struct + Read func(ctx context.Context, endpoint, model string) (seatload.Reading, error) + Unload func(ctx context.Context, endpoint, model string) error