ollama/server/internal/client/ollama
Blake Mizerany 3457a315b2
server/internal/client/ollama: cleanup use of multiple counters (#10304)
The completed and received counters must work in tandem and the code
should better reflect that. Previously, the act of updating them was 2-3
lines of code duplicated in multiple places. This consolidates them into
a single update closure for easy reading and maintenance.

This also simplifies error handling in places where we can use a return
parameter and defer to handle the error case for updates.

Also, remove the old Layer field from the trackingReader struct.
2025-04-16 14:33:40 -07:00
..
registry.go server/internal/client/ollama: cleanup use of multiple counters (#10304) 2025-04-16 14:33:40 -07:00
registry_test.go cmd: add retry/backoff (#10069) 2025-04-15 23:24:44 -07:00
trace.go cmd: add retry/backoff (#10069) 2025-04-15 23:24:44 -07:00