console

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMux

func NewMux(opts ServerOptions) (http.Handler, error)

NewMux constructs the console HTTP mux with the supplied dependencies.

func StartServer

func StartServer(ctx context.Context, addr string, opts ServerOptions) error

StartServer launches the HTTP console on the provided address. When store is nil, the server falls back to mock responses so the UI still functions.

Types

type AuthConfig

type AuthConfig struct {
	Username string
	Password string
}

type BrokerRuntime

type BrokerRuntime struct {
	CPUPercent float64
	MemBytes   int64
}

type MetricsProvider

type MetricsProvider interface {
	Snapshot(ctx context.Context) (*MetricsSnapshot, error)
}

func NewAggregatedPromMetricsClient

func NewAggregatedPromMetricsClient(store metadata.Store, metricsURL string) MetricsProvider

func NewCompositeMetricsProvider

func NewCompositeMetricsProvider(broker MetricsProvider, operatorURL string) MetricsProvider

func NewPromMetricsClient

func NewPromMetricsClient(url string) MetricsProvider

type MetricsSnapshot

type MetricsSnapshot struct {
	S3State                            string
	S3LatencyMS                        int
	S3ErrorRate                        float64
	ProduceRPS                         float64
	FetchRPS                           float64
	AdminRequestsTotal                 float64
	AdminRequestErrorsTotal            float64
	AdminRequestLatencyMS              float64
	BrokerCPUPercent                   float64
	BrokerMemBytes                     int64
	BrokerRuntime                      map[string]BrokerRuntime
	OperatorClusters                   float64
	OperatorEtcdSnapshotAgeSeconds     float64
	OperatorEtcdSnapshotLastSuccessTS  float64
	OperatorEtcdSnapshotLastScheduleTS float64
	OperatorEtcdSnapshotStale          float64
	OperatorEtcdSnapshotAccessOK       float64
	OperatorMetricsAvailable           bool
}

type ServerOptions

type ServerOptions struct {
	Store   metadata.Store
	Metrics MetricsProvider
	Logger  *log.Logger
	Auth    AuthConfig
}

Jump to

Keyboard shortcuts

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