Documentation
¶
Overview ¶
Package huddash renders a self-contained hauler dashboard HTML page (inline SVG, no JavaScript) from the durable haul_results + fleet_timeseries history in market.db plus the live fleet-status.json. It is the Phase-2 generator for docs/superpowers/specs/2026-06-26-hauler-dashboard-design.md.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AgentData ¶
type AgentData struct {
AgentID string
Status balances.LiveRecord // current credits/location/fuel/cargo (may be zero if absent)
HasStat bool // whether Status was found in fleet-status.json
Hauls []market.HaulResult // within window
Series []market.FleetSnapshot // within window
}
AgentData is one hauler's window-filtered history plus its current status.
type Input ¶
type Input struct {
GeneratedAt time.Time
Period Period
Window time.Duration
Agents []AgentData // sorted by agent id
}
Input is the fully-assembled render model.
func LoadInput ¶
func LoadInput(ctx context.Context, ld Loader, statusPath string, p Period, window time.Duration, now time.Time) (Input, error)
LoadInput assembles the render model: haul_results + fleet_timeseries from the market DB (window-filtered) joined with the live fleet-status.json. Agents are the haulers in the status file plus any agent that has hauls in the window.
type Loader ¶
type Loader interface {
GetHaulResults(ctx context.Context, agentID string, limit int) ([]market.HaulResult, error)
GetFleetSnapshots(ctx context.Context, agentID string, limit int) ([]market.FleetSnapshot, error)
}
Loader is the subset of *market.Collector this package needs (eases testing).