Documentation
¶
Index ¶
- func RegisterDiagnostics(api huma.API, diag *diagnostics.DiagnosticsService)
- func RegisterStream(api huma.API, dashboardHandler *dashboard.DashboardHandler, ...)
- type DiagnosticsHandler
- type DiagnosticsInput
- type GetDiagnosticsLogsOutput
- type GetDiagnosticsOutput
- type StreamClientInput
- type StreamHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterDiagnostics ¶
func RegisterDiagnostics(api huma.API, diag *diagnostics.DiagnosticsService)
RegisterDiagnostics registers the Huma diagnostics REST endpoints.
func RegisterStream ¶ added in v2.6.0
func RegisterStream( api huma.API, dashboardHandler *dashboard.DashboardHandler, activityHandler *activity.ActivityHandler, environmentHandler *environment.EnvironmentHandler, )
RegisterStream registers the multiplexed client stream. It builds its own per-domain handlers from the same services the individual handlers use, so each channel's producer stays the single implementation of that feed.
Types ¶
type DiagnosticsHandler ¶
type DiagnosticsHandler struct {
// contains filtered or unexported fields
}
DiagnosticsHandler serves the REST diagnostics endpoints. The live WebSocket streams and pprof routes live in the api/ws package alongside the other streaming endpoints; the snapshot is assembled there too (ws.BuildDiagnostics).
func (*DiagnosticsHandler) GetDiagnostics ¶
func (h *DiagnosticsHandler) GetDiagnostics(_ context.Context, _ *DiagnosticsInput) (*GetDiagnosticsOutput, error)
func (*DiagnosticsHandler) GetRecentLogs ¶
func (h *DiagnosticsHandler) GetRecentLogs(_ context.Context, _ *DiagnosticsInput) (*GetDiagnosticsLogsOutput, error)
type DiagnosticsInput ¶
type DiagnosticsInput struct{}
type GetDiagnosticsOutput ¶
type GetDiagnosticsOutput struct {
Body system.Diagnostics
}
type StreamClientInput ¶ added in v2.6.0
type StreamClientInput struct {
Channels string `query:"channels" doc:"Comma-separated channels to subscribe to: environments, dashboard, activities"`
DebugAllGood bool `query:"debugAllGood" default:"false" doc:"Debug mode for the dashboard channel: force an empty action item list"`
Limit int `query:"limit" default:"0" doc:"Maximum activities to include in each activities-channel snapshot"`
}
type StreamHandler ¶ added in v2.6.0
type StreamHandler struct {
// contains filtered or unexported fields
}
StreamHandler multiplexes every live feed onto one connection.
func (*StreamHandler) StreamClient ¶ added in v2.6.0
func (h *StreamHandler) StreamClient(ctx context.Context, input *StreamClientInput) (*huma.StreamResponse, error)
Click to show internal directories.
Click to hide internal directories.