Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct{}
Handler implements system endpoints.
func (*Handler) GetSystemConfig ¶
func (h *Handler) GetSystemConfig(w http.ResponseWriter, r *http.Request)
GetSystemConfig 返回已应用的工作池大小及本机资源指标。 @Summary 获取系统状态 @Description 返回已生效的工作池大小及 CPU、内存、磁盘指标。容量单位为字节,使用率为百分比,无法读取的指标为 null。实时指标订阅走 /api/v1/ws 的 system 主题。 @Tags 系统 @Produce application/json,application/yaml @Success 200 {object} api.Response[iproto.SSystemConfig] @Failure 503 {string} string "工作池查询不可用或超时" @Router /api/v1/system [get]
func (*Handler) RegisterStream ¶
func (h *Handler) RegisterStream(reg *httpx.StreamRegistry)
RegisterStream exposes the resource metrics as the "system" topic and the pool resize as the "system.update" method.