Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentBucket ¶
type AgentHealthRow ¶
type AgentHealthRow struct {
AgentID string `json:"agent_id"`
Requests int64 `json:"requests"`
Failed int64 `json:"failed"`
ErrorRate float64 `json:"error_rate"`
QPS float64 `json:"qps"`
WindowSecs int `json:"window_secs"`
}
AgentHealthRow 是某 agent 近窗健康原始信号(红黄绿由前端按 Settings 阈值算)。
type FailedAgent ¶
type Handler ¶
type Handler struct {
HubCall func(agentID string, method string, params any, timeout time.Duration) (json.RawMessage, error)
GetOnlineAgentIDs func() []string
}
Handler 持有扇出可观测 RPC 所需的 Hub 依赖(与 master/api/agent.Handler 同源装配)。
func (*Handler) GetLimiterUsage ¶
func (h *Handler) GetLimiterUsage(c *app.Context, _ api.EmptyRequest) (LimiterUsageResponse, error)
func (*Handler) GetRecentHealth ¶
func (h *Handler) GetRecentHealth(c *app.Context, _ api.EmptyRequest) (RecentHealthResponse, error)
GetRecentHealth 返回各 agent 近窗错误率/QPS。窗口取 health_window_seconds 设置(默认 300)。
type LimiterBucketRow ¶
type LimiterBucketRow struct {
protocol.LimiterBucketStat
PerAgent []AgentBucket `json:"per_agent"`
}
LimiterBucketRow 是集群聚合后的一行 + per-agent 明细(饱和度看每节点,v1 本地执行=本地求和)。
type LimiterUsageResponse ¶
type LimiterUsageResponse struct {
Buckets []LimiterBucketRow `json:"buckets"`
FailedAgents []FailedAgent `json:"failed_agents"`
}
type RecentHealthResponse ¶
type RecentHealthResponse struct {
Agents []AgentHealthRow `json:"agents"`
WindowSecs int `json:"window_secs"`
}
Click to show internal directories.
Click to hide internal directories.