Versions in this module Expand all Collapse all v0 v0.1.6 Jul 31, 2024 v0.1.5 Sep 25, 2023 v0.1.4 May 12, 2023 v0.1.3 Apr 10, 2023 v0.1.2 Mar 23, 2023 v0.1.1 Mar 9, 2023 v0.1.0 Oct 4, 2022 v0.0.6 Jul 27, 2022 v0.0.5 Aug 2, 2022 v0.0.4 Jul 27, 2022 v0.0.3 Jul 27, 2022 v0.0.2 May 19, 2022 v0.0.1 May 17, 2022 Changes in this version + const DefaultC + const DefaultCommand + const DefaultDirMod + const DefaultFileMod + const DefaultHost + const DefaultLogLevel + const DefaultLoggerTailCount + const DefaultMethod + const DefaultN + const DefaultPFAddress + const DefaultPort + const DefaultRefreshRate + const DefaultSinceSeconds + const MaxFavoritesNS + const MaxLogThreshold + const W2Config + var DefaultLogFile = filepath.Join(os.TempDir(), fmt.Sprintf("w2-%s.log", MustW2User())) + var K9sAlias = filepath.Join(W2Home(), "alias.yml") + var K9sBench = "bench" + var K9sHotKeys = filepath.Join(W2Home(), "hotkey.yml") + var K9sPlugins = filepath.Join(W2Home(), "plugin.yml") + var K9sStylesFile = filepath.Join(W2Home(), "skin.yml") + var K9sViewConfigFile = filepath.Join(W2Home(), "views.yml") + var W2ConfigFile = filepath.Join(W2Home(), "config.yml") + var W2DefaultScreenDumpDir = filepath.Join(os.TempDir(), fmt.Sprintf("weewoe-screens-%s", MustW2User())) + func EnsureFullPath(path string, mod os.FileMode) + func EnsurePath(path string, mod os.FileMode) + func InList(ll []string, n string) bool + func IsBoolSet(b *bool) bool + func MustW2User() string + func W2Home() string + type Alias map[string]string + type Aliases struct + Alias Alias + func NewAliases() *Aliases + func (a *Aliases) Clear() + func (a *Aliases) Define(gvr string, aliases ...string) + func (a *Aliases) Get(k string) (string, bool) + func (a *Aliases) Keys() []string + func (a *Aliases) Load() error + func (a *Aliases) LoadFileAliases(path string) error + func (a *Aliases) Save() error + func (a *Aliases) SaveAliases(path string) error + func (a *Aliases) ShortNames() ShortNames + type Auth struct + Password string + User string + type Bench struct + Benchmarks *Benchmarks + func NewBench(path string) (*Bench, error) + func (s *Bench) Reload(path string) error + type BenchConfig struct + Auth Auth + C int + HTTP HTTP + N int + Name string + func DefaultBenchSpec() BenchConfig + type Benchmark struct + C int + N int + func (b Benchmark) Empty() bool + type Benchmarks struct + Containers map[string]BenchConfig + Defaults Benchmark + Services map[string]BenchConfig + type Body struct + BgColor Color + FgColor Color + LogoColor Color + type Border struct + FgColor Color + FocusColor Color + type Charts struct + BgColor Color + ChartBgColor Color + DefaultChartColors Colors + DefaultDialColors Colors + DialBgColor Color + ResourceColors map[string]Colors + type Cluster struct + FeatureGates *FeatureGates + Namespace *Namespace + PortForwardAddress string + View *View + func NewCluster() *Cluster + type Color string + const DefaultColor + const TransparentColor + func NewColor(c string) Color + func (c Color) Color() tcell.Color + func (c Color) String() string + type Colors []Color + func (c Colors) Colors() []tcell.Color + type Config struct + W2 *W2 + func NewConfig() *Config + func (c *Config) ActiveNamespace() string + func (c *Config) ActiveView() string + func (c *Config) Dump(msg string) + func (c *Config) FavNamespaces() []string + func (c *Config) Load(path string) error + func (c *Config) Refine() error + func (c *Config) Save() error + func (c *Config) SaveFile(path string) error + func (c *Config) SetActiveNamespace(ns string) error + func (c *Config) SetActiveView(view string) + type Crumb struct + ActiveColor Color + BgColor Color + FgColor Color + type CustomView struct + K9s ViewSettings + func NewCustomView() *CustomView + func (v *CustomView) AddListener(gvr string, l ViewConfigListener) + func (v *CustomView) Load(path string) error + func (v *CustomView) RemoveListener(gvr string) + func (v *CustomView) Reset() + type Dialog struct + BgColor Color + ButtonBgColor Color + ButtonFgColor Color + ButtonFocusBgColor Color + ButtonFocusFgColor Color + FgColor Color + FieldFgColor Color + LabelFgColor Color + type FeatureGates struct + NodeShell bool + func NewFeatureGates() *FeatureGates + type Flags struct + AllNamespaces *bool + Command *string + Crumbsless *bool + Headless *bool + Host *string + LogFile *string + LogLevel *string + Logoless *bool + Port *string + ReadOnly *bool + RefreshRate *int + ScreenDumpDir *string + Write *bool + func NewFlags() *Flags + type Frame struct + Border Border + Crumb Crumb + Menu Menu + Status Status + Title Title + type HTTP struct + Body string + HTTP2 bool + Headers http.Header + Host string + Method string + Path string + type Help struct + BgColor Color + FgColor Color + KeyColor Color + NumKeyColor Color + SectionColor Color + type HotKey struct + Command string + Description string + ShortCut string + type HotKeys struct + HotKey map[string]HotKey + func NewHotKeys() HotKeys + func (h HotKeys) Load() error + func (h HotKeys) LoadHotKeys(path string) error + type Info struct + FgColor Color + SectionColor Color + type Log struct + BgColor Color + FgColor Color + Indicator LogIndicator + type LogIndicator struct + BgColor Color + FgColor Color + type Logger struct + BufferSize int + FullScreenLogs bool + ShowTime bool + SinceSeconds int64 + TailCount int64 + TextWrap bool + func NewLogger() *Logger + func (l *Logger) Validate() + type Menu struct + FgColor Color + KeyColor Color + NumKeyColor Color + type Namespace struct + Active string + Favorites []string + func NewNamespace() *Namespace + func (n *Namespace) SetActive(ns string) error + type Plugin struct + Args []string + Background bool + Command string + Confirm bool + Description string + Pipes []string + Scopes []string + ShortCut string + func (p Plugin) String() string + type Plugins struct + Plugin map[string]Plugin + func NewPlugins() Plugins + func (p Plugins) Load() error + func (p Plugins) LoadPlugins(path string) error + type Prompt struct + BgColor Color + FgColor Color + SuggestColor Color + type Severity struct + Critical int + Warn int + func NewSeverity() *Severity + func (s *Severity) Validate() + type SeverityLevel int + const SeverityHigh + const SeverityLow + const SeverityMedium + type ShortNames map[string][]string + type Status struct + AddColor Color + CompletedColor Color + ErrorColor Color + HighlightColor Color + KillColor Color + ModifyColor Color + NewColor Color + PendingColor Color + type Style struct + Body Body + Dialog Dialog + Frame Frame + Help Help + Info Info + Prompt Prompt + Views Views + type StyleListener interface + StylesChanged func(*Styles) + type Styles struct + K9s Style + func NewStyles() *Styles + func (s *Styles) AddListener(l StyleListener) + func (s *Styles) BgColor() tcell.Color + func (s *Styles) Body() Body + func (s *Styles) Charts() Charts + func (s *Styles) Crumb() Crumb + func (s *Styles) DefaultSkin() + func (s *Styles) Dialog() Dialog + func (s *Styles) FgColor() tcell.Color + func (s *Styles) Frame() Frame + func (s *Styles) Load(path string) error + func (s *Styles) RemoveListener(l StyleListener) + func (s *Styles) Reset() + func (s *Styles) Table() Table + func (s *Styles) Title() Title + func (s *Styles) Update() + func (s *Styles) Views() Views + func (s *Styles) Xray() Xray + type Table struct + BgColor Color + CursorBgColor Color + CursorFgColor Color + FgColor Color + Header TableHeader + MarkColor Color + type TableHeader struct + BgColor Color + FgColor Color + SorterColor Color + type Title struct + BgColor Color + CounterColor Color + FgColor Color + FilterColor Color + HighlightColor Color + type View struct + Active string + func NewView() *View + func (v *View) Validate() + type ViewConfigListener interface + ViewSettingsChanged func(ViewSetting) + type ViewSetting struct + Columns []string + SortColumn string + type ViewSettings struct + Views map[string]ViewSetting + func NewViewSettings() ViewSettings + type Views struct + Charts Charts + Log Log + Table Table + Xray Xray + Yaml Yaml + type W2 struct + Cluster *Cluster + Crumbsless bool + EnableMouse bool + Headless bool + Logger *Logger + Logoless bool + MaxConnRetry int + NoIcons bool + ReadOnly bool + RefreshRate int + ScreenDumpDir string + func NewWeeWoe() *W2 + func (w *W2) ActiveCluster() *Cluster + func (w *W2) GRPCServer() string + func (w *W2) GetRefreshRate() int + func (w *W2) GetScreenDumpDir() string + func (w *W2) IsCrumbsless() bool + func (w *W2) IsHeadless() bool + func (w *W2) IsLogoless() bool + func (w *W2) IsReadOnly() bool + func (w *W2) OverrideCommand(cmd string) + func (w *W2) OverrideCrumbsless(b bool) + func (w *W2) OverrideHeadless(b bool) + func (w *W2) OverrideHost(h string) + func (w *W2) OverrideLogoless(b bool) + func (w *W2) OverridePort(p string) + func (w *W2) OverrideReadOnly(b bool) + func (w *W2) OverrideRefreshRate(r int) + func (w *W2) OverrideScreenDumpDir(dir string) + func (w *W2) OverrideWrite(b bool) + type Xray struct + BgColor Color + CursorColor Color + CursorTextColor Color + FgColor Color + GraphicColor Color + type Yaml struct + ColonColor Color + KeyColor Color + ValueColor Color