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 BrokerRuntime ¶
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
}
Click to show internal directories.
Click to hide internal directories.