floors

package
v0.209.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2026 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package floors reads setup/floors.json, the one file that may name a build number.

A floor is the minimum build a seat or the harness needs. A ceiling or an exact pin is not representable here, and the update verb never selects a candidate under a floor (ADR 0099). The root package embeds the file (go:embed cannot reach setup/ from below it) and hands the bytes to Parse.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Comparable

func Comparable(id, floor string) bool

Comparable reports whether an id and a floor are the same shape (both dotted versions, or both single build numbers); a whisper.cpp b-tag against a dotted version floor is not.

func Compare

func Compare(a, b string) int

Compare orders two ids of the same upstream by Key: -1, 0, +1. An id with no number is the lowest.

func Key

func Key(id string) []int

Key extracts the comparable part of an upstream id: the first dotted number run ("b11669" -> [11669], "master-968-abc1234" -> [968], "v268" -> [268], "1.8.3" -> [1 8 3]).

Types

type Entry

type Entry struct {
	Harness string
	Seats   map[string]string
}

Entry is one upstream's floors: the harness floor and the per-seat floors.

type Set

type Set map[string]Entry

Set is the parsed floors file keyed by upstream name (llama.cpp, whisper.cpp, ...).

func Parse

func Parse(raw []byte) (Set, error)

Parse reads the floors file. Every value may be a JSON number or string.

func (Set) Below

func (s Set) Below(upstream, id string) (below, compared bool)

Below reports whether id is under the upstream's floor. An id that cannot be compared with the floor (different shape) is not below it; the second return value says whether a comparison was made.

func (Set) Floor

func (s Set) Floor(upstream string) string

Floor is the highest floor that applies to an upstream (the harness floor and every seat floor), "" when none.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL