Documentation
¶
Overview ¶
Package cliconfig manages the persistent CLI context (active cluster, region, AWS profile) used to avoid passing --cluster on every invocation.
Storage: $XDG_CONFIG_HOME/refresh/context.yaml (default ~/.config/refresh/context.yaml). The schema mirrors kubectx semantics: a named map of contexts, a current pointer, and a previous pointer for `refresh use -`.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Context ¶
type Context struct {
Cluster string `yaml:"cluster"`
Region string `yaml:"region,omitempty"`
Profile string `yaml:"profile,omitempty"`
}
Context is a named pointer at an EKS cluster within a region/profile.
type File ¶
type File struct {
Current string `yaml:"current,omitempty"`
Previous string `yaml:"previous,omitempty"`
Contexts map[string]Context `yaml:"contexts,omitempty"`
}
File is the persisted YAML document.
func (*File) Active ¶
Active returns the currently selected context, if any.
Resolution order: REFRESH_CONTEXT env var (per-shell override, kubectx-style) then File.Current. Returns ("", Context{}, false) when nothing is set.
func (*File) Remove ¶
Remove deletes a context entry. If it was current/previous, those pointers are cleared.