Documentation
¶
Overview ¶
Package statusclient is the CLI's HTTP client for a running kram-gateway's /admin/status: real per-provider telemetry and combo definitions, used to draw the footer and the expanded strategy panel. Nothing here is simulated — every number comes straight from the gateway's own counters.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client talks to a kram-gateway instance's status endpoint.
func New ¶
New builds a client pointed at a running gateway (e.g. http://127.0.0.1:20128).
type Combo ¶
type Combo struct {
ID string `json:"id"`
Strategy string `json:"strategy"`
Providers []string `json:"providers"`
}
Combo is one entry in the gateway's status response.
type Provider ¶
type Provider struct {
ID string `json:"id"`
Kind string `json:"kind"`
BreakerOpen bool `json:"breaker_open"`
Stats ProviderStats `json:"stats"`
}
Provider is one entry in the gateway's status response.
type ProviderStats ¶
type ProviderStats struct {
Requests int64 `json:"requests"`
Failures int64 `json:"failures"`
PromptTokens int64 `json:"prompt_tokens"`
CompletionTokens int64 `json:"completion_tokens"`
AvgLatencyMS int64 `json:"avg_latency_ms"`
SuccessRate float64 `json:"success_rate"`
}
ProviderStats mirrors the gateway's telemetry.ProviderStats.
Click to show internal directories.
Click to hide internal directories.