Help us shape the future of Go! Take the 2026 Go Developer Survey

handlers

package
v2.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2026 License: BSD-3-Clause Imports: 28 Imported by: 0

Documentation

Index

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,
	eventService *event.EventService,
	versionService *version.VersionService,
)

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 (*DiagnosticsHandler) GetRecentLogs

func (*DiagnosticsHandler) ScanGoroutineLeaks added in v2.9.0

type DiagnosticsInput

type DiagnosticsInput struct{}

type GetDiagnosticsLogsOutput

type GetDiagnosticsLogsOutput struct {
	Body []logs.Entry
}

type GetDiagnosticsOutput

type GetDiagnosticsOutput struct {
	Body system.Diagnostics
}

type ScanGoroutineLeaksInput added in v2.9.0

type ScanGoroutineLeaksInput struct{}

type ScanGoroutineLeaksOutput added in v2.9.0

type ScanGoroutineLeaksOutput struct {
	Body system.GoroutineLeakReport
}

type StreamClientInput added in v2.6.0

type StreamClientInput struct {
	Channels     string `query:"channels" doc:"Comma-separated channels to subscribe to: environments, dashboard, activities, events, version"`
	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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL