Documentation
¶
Overview ¶
Package config holds the CLI surface for mig: flag parsing, environment fallbacks, and the Config struct passed into the source/metrics/tui layers.
Index ¶
Constants ¶
View Source
const DefaultTheme = "default"
DefaultTheme is the theme name used when the user has not chosen one elsewhere (flag, env, or config file).
Variables ¶
This section is empty.
Functions ¶
func IsListThemes ¶
IsListThemes reports whether err is the sentinel returned for --theme=?, so main can exit 0 instead of treating it as a parse error.
Types ¶
type Config ¶
type Config struct {
// Connection
Servers []string
User string
Password string
Creds string
NKey string
TLSCert string
TLSKey string
TLSCA string
Context string
Name string
// Subscription
Subjects []string
Stream string
ForceCore bool
Deliver DeliverPolicy
Since time.Duration
Unbounded bool
// UI / behavior
Refresh time.Duration
Stale time.Duration
MaxSubjects int
MaxPaths int
SchemaSample float64
NoTUI bool
JSONPretty bool
Theme string
ConfigPath string
SparkSeconds int // length of the rate sparkline ring, in seconds
HistSamples int // per-path numeric reservoir size feeding the histogram
// Meta
ShowVersion bool
}
Config is the parsed CLI configuration shared across mig subsystems.
type DeliverPolicy ¶
type DeliverPolicy string
DeliverPolicy maps to JetStream DeliverPolicy. Strings are mapped at the source layer to avoid pulling nats.go into config.
const ( DeliverNew DeliverPolicy = "new" DeliverAll DeliverPolicy = "all" DeliverByStartTime DeliverPolicy = "since" DeliverLastPerSubject DeliverPolicy = "last-per-subject" )
DeliverPolicy values, mirroring jetstream.DeliverPolicy options that mig exposes.
Click to show internal directories.
Click to hide internal directories.