Documentation ¶
Index ¶
- Constants
- func StaticClusterClient(client cluster.ClientInterface) *staticClusterClient
- type KubeContextDecorator
- type Live
- func (l *Live) BuildInfo() (string, string, string)
- func (l *Live) CRDWatcher() config.CRDWatcher
- func (l *Live) ClusterClient() cluster.ClientInterface
- func (l *Live) Contexts() []kubeconfig.Context
- func (l *Live) CurrentContext() string
- func (l *Live) DefaultNamespace() string
- func (l *Live) ErrorStore() oerrors.ErrorStore
- func (l *Live) KubeConfigPath() string
- func (l *Live) Logger() log.Logger
- func (l *Live) ModuleManager() module.ManagerInterface
- func (l *Live) ObjectPath(namespace, apiVersion, kind, name string) (string, error)
- func (l *Live) ObjectStore() store.Store
- func (l *Live) PluginManager() plugin.ManagerInterface
- func (l *Live) PortForwarder() portforward.PortForwarder
- func (l *Live) SetContextChosenInUI(contextChosen bool)
- func (l *Live) UseContext(ctx context.Context, contextName string) error
- func (l *Live) UseFSContext(ctx context.Context) error
- func (l *Live) Validate() error
Constants ¶
const UseFSContext = ""
UseFSContext is used to indicate a context switch to the file system Kubeconfig context
Variables ¶
This section is empty.
Functions ¶
func StaticClusterClient ¶ added in v0.18.0
func StaticClusterClient(client cluster.ClientInterface) *staticClusterClient
Types ¶
type KubeContextDecorator ¶ added in v0.18.0
type KubeContextDecorator interface { SwitchContext(context.Context, string) error ClusterClient() cluster.ClientInterface CurrentContext() string Contexts() []kubeconfig.Context }
KubeContextDecorator handles context changes
type Live ¶
type Live struct {
// contains filtered or unexported fields
}
Live is a live version of dash config.
func NewLiveConfig ¶
func NewLiveConfig( kubeContextDecorator KubeContextDecorator, crdWatcher config.CRDWatcher, logger log.Logger, moduleManager module.ManagerInterface, objectStore store.Store, errorStore oerrors.ErrorStore, pluginManager plugin.ManagerInterface, portForwarder portforward.PortForwarder, restConfigOptions cluster.RESTConfigOptions, buildInfo config.BuildInfo, kubeConfigPath string, contextChosenInUI bool, ) *Live
NewLiveConfig creates an instance of Live.
func (*Live) BuildInfo ¶ added in v0.13.0
BuildInfo returns build ldflag strings for version, commit hash, and build time
func (*Live) CRDWatcher ¶
func (l *Live) CRDWatcher() config.CRDWatcher
CRDWatcher returns a CRD watcher.
func (*Live) ClusterClient ¶
func (l *Live) ClusterClient() cluster.ClientInterface
ClusterClient returns a cluster client.
func (*Live) Contexts ¶ added in v0.18.0
func (l *Live) Contexts() []kubeconfig.Context
Contexts returns the set of all contexts
func (*Live) CurrentContext ¶ added in v0.18.0
CurrentContext returns the current context name
func (*Live) DefaultNamespace ¶
DefaultNamespace returns the default namespace for the current cluster..
func (*Live) ErrorStore ¶
func (l *Live) ErrorStore() oerrors.ErrorStore
ErrorStore returns an error store.
func (*Live) KubeConfigPath ¶
func (*Live) ModuleManager ¶
func (l *Live) ModuleManager() module.ManagerInterface
func (*Live) ObjectPath ¶
ObjectPath returns the path given an object description.
func (*Live) ObjectStore ¶
ObjectStore returns an object store.
func (*Live) PluginManager ¶
func (l *Live) PluginManager() plugin.ManagerInterface
PluginManager returns a plugin manager.
func (*Live) PortForwarder ¶
func (l *Live) PortForwarder() portforward.PortForwarder
PortForwarder returns a port forwarder.
func (*Live) SetContextChosenInUI ¶ added in v0.18.0
func (*Live) UseContext ¶
UseContext switches context name. This process should have synchronously.