Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidColumns = errors.New("invalid connections columns") // ErrInvalidLogLevels identifies an empty, unknown, or duplicate display-level selection. ErrInvalidLogLevels = errors.New("invalid log display levels") // ErrInvalidLatencyConcurrency identifies an out-of-range latency test limit. ErrInvalidLatencyConcurrency = errors.New("latency test concurrency must be between 1 and 50") )
Functions ¶
func ValidateLatencyConcurrency ¶ added in v0.9.6
ValidateLatencyConcurrency shares the stored-value bounds with installer migration.
func ValidateLogLevels ¶ added in v0.9.6
ValidateLogLevels validates a nonempty set of canonical display level names.
Types ¶
type Preferences ¶
type Preferences struct {
ConnectionsColumns []string
Proxies ProxyPreferences
// LogLevels is the committed set of canonical levels restored by new TUI sessions.
LogLevels []string
}
type ProxyPreferences ¶ added in v0.9.6
type ProxyPreferences struct {
ExtraLatency bool `json:"extra_latency"`
AutoLatencyTest bool `json:"auto_latency_test"`
LatencyTestConcurrency int `json:"latency_test_concurrency,omitempty"`
}
ProxyPreferences controls Proxies presentation and automatic latency tests.
func DefaultProxyPreferences ¶ added in v0.9.6
func DefaultProxyPreferences() ProxyPreferences
DefaultProxyPreferences enables both switches and keeps five concurrent tests.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) Snapshot ¶
func (s *Service) Snapshot() Preferences
type Update ¶
type Update struct {
ConnectionsColumns []string
Proxies *ProxyPreferences
// LogLevels replaces the saved set when non-nil; an empty set is invalid.
LogLevels []string
}