Admin: leases, pin, release, drain, usage, metrics

cmd/crossbar/main.go calls admin.Handler with the new 6-arg signature, passing nil for the not-yet-wired leases/limiter/store/drainer (task 07 wires them) so go vet and go test ./... pass on cmd/crossbar. This is a compile fix, not the task-07 wiring; noted in the implementer-log.

Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
This commit is contained in:
2026-09-25 06:33:29 -07:00
parent c2a8b88a3f
commit 32ac7f549a
9 changed files with 808 additions and 97 deletions
+12
View File
@@ -141,6 +141,18 @@ func scanUsage(rows *sql.Rows) ([]UsageRow, error) {
return out, rows.Err()
}
func scanStatusCounts(rows *sql.Rows) ([]StatusCount, error) {
var out []StatusCount
for rows.Next() {
var c StatusCount
if err := rows.Scan(&c.Route, &c.Host, &c.Status, &c.Count); err != nil {
return nil, wrap(err)
}
out = append(out, c)
}
return out, rows.Err()
}
func scanEvents(rows *sql.Rows) ([]LeaseEvent, error) {
var out []LeaseEvent
for rows.Next() {