Repository navigation
gateway: GET /v1/berth/board reads the node in one call - #142
Merged
Merged
Conversation
The switchboard's read side: the card and who holds it, every engine in berth.toml with its state and whether it can be switched to or stopped, and each engine's models with the ones its reader reports loaded. The gateway builds it because it alone knows a start in flight. Cards is a list and every engine row names itself, so more cards and more nodes add rows to the same shape.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Step 3 of the switchboard plan: the read side the phone board will draw.
Change
GET /v1/berth/board(keyed) answers one node:/gui/board's rows, plusstoppable(holds the card under an active lease that isn't pinned) and its models: the engine's own list while it is up, itsservesotherwise. A model'sloadedcomes from berthd's engine reader, which for llama-swap reads/running.guiStateAllbecomesguiRows(ctx, node), so the board and/gui/stateshare one berthd status read.Proof
TestBoard: idle node (card free), then a switch. The card becomes held bystrata/active, strata is up and stoppable with its model, and a stopped comfyui is launchable but not stoppable, with itsserves.TestBoardOf(table): berthd unreachable, held with one llama-swap model ready and one starting, a pinned game (not stoppable), draining, and in a VM.go test ./..., Windows build and vet, golangci-lint (0 issues),-race -count=3.Not run against the live gateway, for the same reason as #141.