datasource

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EntityMonitor

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

EntityMonitor monitors entity state from the KV store

func NewEntityMonitor

func NewEntityMonitor(registry *workers.EntityRegistry, kv nats.KeyValue) *EntityMonitor

NewEntityMonitor creates a new entity monitor

func (*EntityMonitor) GetEntities

func (e *EntityMonitor) GetEntities() []EntitySummary

GetEntities returns a summary of all registered entities

type EntitySummary

type EntitySummary struct {
	ID         string
	Name       string
	EntityType string
	Status     string
	IsLive     bool
	OrgID      string
}

EntitySummary is a condensed entity view for the TUI

type LogEntry

type LogEntry struct {
	Time    time.Time
	Level   string
	Message string
	Fields  map[string]interface{}
}

LogEntry represents a log entry

type LogSource

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

LogSource wraps the logger TUI hook for the TUI

func NewLogSource

func NewLogSource(hook *logger.TUIHook) *LogSource

NewLogSource creates a new log source from the logger hook

func (*LogSource) Channel

func (l *LogSource) Channel() <-chan logger.LogEntry

Channel returns the log entry channel

type MetricsSnapshot

type MetricsSnapshot struct {
	MemTotal      uint64
	MemAlloc      uint64
	HeapAlloc     uint64
	NumGoroutines int
	NumCPU        int
	NumGC         uint32
}

MetricsSnapshot contains system metrics

type NATSStats

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

NATSStats monitors NATS JetStream statistics

func NewNATSStats

func NewNATSStats(js nats.JetStreamContext) *NATSStats

NewNATSStats creates a new NATS stats monitor

func (*NATSStats) GetStreamStats

func (n *NATSStats) GetStreamStats() []StreamStat

GetStreamStats returns statistics for all constellation streams

type PrometheusAdapter added in v0.0.15

type PrometheusAdapter struct{}

PrometheusAdapter collects metrics from Prometheus registry for TUI display

func NewPrometheusAdapter added in v0.0.15

func NewPrometheusAdapter() *PrometheusAdapter

NewPrometheusAdapter creates a new Prometheus adapter

func (*PrometheusAdapter) Collect added in v0.0.15

func (a *PrometheusAdapter) Collect() MetricsSnapshot

Collect gathers metrics from the Prometheus registry

type RuntimeMetrics

type RuntimeMetrics struct{}

RuntimeMetrics collects Go runtime metrics

func NewRuntimeMetrics

func NewRuntimeMetrics() *RuntimeMetrics

NewRuntimeMetrics creates a new runtime metrics collector

func (*RuntimeMetrics) Collect

func (m *RuntimeMetrics) Collect() MetricsSnapshot

Collect gathers current runtime metrics

type StreamStat

type StreamStat struct {
	Name     string
	Messages uint64
	Bytes    uint64
}

StreamStat represents NATS stream statistics

type WorkerHealthChecker

type WorkerHealthChecker interface {
	workers.Worker
	HealthCheck() error
}

WorkerHealthChecker is an interface for workers that support health checks

type WorkerStatus

type WorkerStatus struct {
	Name    string
	Healthy bool
}

WorkerStatus represents a worker's status

type WorkersMonitor

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

WorkersMonitor monitors worker health status

func NewWorkersMonitor

func NewWorkersMonitor(manager *workers.Manager) *WorkersMonitor

NewWorkersMonitor creates a new workers monitor

func (*WorkersMonitor) GetStatuses

func (w *WorkersMonitor) GetStatuses() []WorkerStatus

GetStatuses returns the current status of all workers

Jump to

Keyboard shortcuts

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