diagnostics

package
v1.6.1-0...-f207c0f Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ControlPlaneDiagnosticsExposer

type ControlPlaneDiagnosticsExposer struct {
	// contains filtered or unexported fields
}

ControlPlaneDiagnosticsExposer exposes ControlPlanes' diagnositics handlers.

func NewControlPlaneDiagnosticsExposer

func NewControlPlaneDiagnosticsExposer(logger logr.Logger) *ControlPlaneDiagnosticsExposer

NewControlPlaneDiagnosticsExposer creates an exposer to expose diagnositics of ControlPlanes.

func (*ControlPlaneDiagnosticsExposer) RegisterInstance

func (e *ControlPlaneDiagnosticsExposer) RegisterInstance(id manager.ID, handler http.Handler)

RegisterInstance registers a new ControlPlane instance.

func (*ControlPlaneDiagnosticsExposer) UnregisterInstance

func (e *ControlPlaneDiagnosticsExposer) UnregisterInstance(id manager.ID)

UnregisterInstance unregisters a ControlPlane instance.

type HTTPHandler

type HTTPHandler struct {
	// contains filtered or unexported fields
}

HTTPHandler is a handler for the diagnostics HTTP endpoints.

func NewHTTPHandler

func NewHTTPHandler(
	cl client.Client,
	logger logr.Logger,
	exposer *ControlPlaneDiagnosticsExposer,
) *HTTPHandler

NewHTTPHandler returns a new HTTP Handler to handle HTTP requests to the diagnostics server.

func (*HTTPHandler) ServeHTTP

func (h *HTTPHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP serves HTTP requests to the diagnostics server.

type ListControlPlaneItem

type ListControlPlaneItem struct {
	Namespace string `json:"namespace"`
	Name      string `json:"name"`
	ID        string `json:"id"`
}

ListControlPlaneItem represents a ControlPlane in the response of listing managed ControlPlanes.

type ListControlPlanesResponse

type ListControlPlanesResponse struct {
	ControlPlanes []ListControlPlaneItem `json:"controlPlanes"`
}

ListControlPlanesResponse is the response for listing managed ControlPlanes.

type Server

type Server struct {
	Addr    string
	Handler *HTTPHandler

	Logger logr.Logger
}

Server handles the diagnostics requests including dumping configuration generated by ControlPlanes.

func (*Server) Start

func (s *Server) Start(ctx context.Context) error

Start implements the Start method of manager.Runnable interface to add to the manager. It starts up the HTTP server and blocks until ctx expires.

Jump to

Keyboard shortcuts

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