Documentation
¶
Index ¶
- Variables
- type AdminSnapshotProvider
- type ChannelStatus
- type ChannelStatusDetail
- type LogBuffer
- func (b *LogBuffer) Capacity() int
- func (b *LogBuffer) Handle(ctx context.Context, record slog.Record)
- func (b *LogBuffer) Recent(limit int) []LogEvent
- func (b *LogBuffer) Since(since time.Time, limit int) []LogEvent
- func (b *LogBuffer) StartedAt() time.Time
- func (b *LogBuffer) Subscribe(ctx context.Context) <-chan LogEvent
- type LogEvent
- type MCPServerKind
- type MetricsSnapshotProvider
- type RuntimeSnapshotProvider
Constants ¶
This section is empty.
Variables ¶
var Module = fx.Module( "adminui", fx.Provide( newConfiguredLogBuffer, NewRuntimeSnapshotProvider, codexappserver.NewBridge, func(buf *LogBuffer) tclog.Sink { return buf }, ), fx.Invoke(registerRoutes), fx.Invoke(registerStartup), )
Module hosts a minimal embedded UI on the existing admin/health server.
Functions ¶
This section is empty.
Types ¶
type AdminSnapshotProvider ¶
type AdminSnapshotProvider func() logExportAdminSnapshots
AdminSnapshotProvider returns the current support-facing admin API snapshots for export bundles.
type ChannelStatus ¶
type ChannelStatus struct {
Name string `json:"name"`
Enabled bool `json:"enabled"`
ServerKind MCPServerKind `json:"server_kind"`
TransportKind config.MCPTransportKind `json:"transport_kind,omitempty"`
ProbeStatus string `json:"probe_status,omitempty"`
ProbeError string `json:"probe_error,omitempty"`
Reason string `json:"reason,omitempty"`
Details []ChannelStatusDetail `json:"details,omitempty"`
}
ChannelStatus describes the runtime availability of a tunnel-client channel.
func BuildChannelStatuses ¶
func BuildChannelStatuses( mcpCfg *config.MCPConfig, harpoonRegistry *harpoon.Registry, stdioInfoProvider mcpclient.ChannelStdioRuntimeInfoProvider, probeState *mcpclient.ProbeState, ) []ChannelStatus
BuildChannelStatuses returns the ordered list of channel statuses for the current runtime state.
type ChannelStatusDetail ¶
ChannelStatusDetail describes a transport-specific detail shown in the overview table.
type LogBuffer ¶
type LogBuffer struct {
// contains filtered or unexported fields
}
LogBuffer stores the most recent log events in memory and supports fan-out streaming.
It is intentionally simple: a fixed-size ring plus a best-effort broadcast to subscribers (slow subscribers will drop events).
func NewLogBuffer ¶
func NewLogBuffer() *LogBuffer
type LogEvent ¶
type LogEvent struct {
Seq int64 `json:"seq"`
Time time.Time `json:"time"`
Level string `json:"level"`
Message string `json:"message"`
Attrs map[string]any `json:"attrs,omitempty"`
}
LogEvent is the structured representation exposed by the admin UI.
type MCPServerKind ¶
type MCPServerKind string
MCPServerKind describes the kind of MCP server backing a channel.
const ( MCPServerKindExternal MCPServerKind = "external" MCPServerKindBuiltin MCPServerKind = "builtin" )
type MetricsSnapshotProvider ¶
type MetricsSnapshotProvider func() (metricsSnapshot, error)
MetricsSnapshotProvider returns a point-in-time Prometheus text snapshot for support log exports.
func NewMetricsSnapshotProvider ¶
func NewMetricsSnapshotProvider(exporter http.Handler) MetricsSnapshotProvider
type RuntimeSnapshotProvider ¶
type RuntimeSnapshotProvider func() logExportRuntime
RuntimeSnapshotProvider returns redacted runtime metadata for support log exports.
func NewRuntimeSnapshotProvider ¶
func NewRuntimeSnapshotProvider(cfg *config.Config) RuntimeSnapshotProvider