console

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2025 License: Apache-2.0 Imports: 16 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 MetricsProvider

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

func NewPromMetricsClient

func NewPromMetricsClient(url string) MetricsProvider

type MetricsSnapshot

type MetricsSnapshot struct {
	S3State                 string
	S3LatencyMS             int
	ProduceRPS              float64
	FetchRPS                float64
	AdminRequestsTotal      float64
	AdminRequestErrorsTotal float64
	AdminRequestLatencyMS   float64
}

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