Documentation
¶
Index ¶
- type CRDWatchConfig
- type CRDWatcher
- type Dash
- type Live
- func (l *Live) CRDWatcher() CRDWatcher
- func (l *Live) ClusterClient() cluster.ClientInterface
- func (l *Live) ContextName() string
- func (l *Live) KubeConfigPath() string
- func (l *Live) Logger() log.Logger
- 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) UseContext(ctx context.Context, contextName string) error
- func (l *Live) Validate() error
- type ObjectHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CRDWatchConfig ¶
type CRDWatchConfig struct { Add ObjectHandler Delete ObjectHandler IsNamespaced bool }
CRDWatchConfig is configuration for CRDWatcher.
func (*CRDWatchConfig) CanPerform ¶
func (c *CRDWatchConfig) CanPerform(u *unstructured.Unstructured) bool
CanPerform returns true if config can perform actions on an object.
type CRDWatcher ¶
type CRDWatcher interface {
Watch(ctx context.Context, config *CRDWatchConfig) error
}
CRDWatcher watches for CRDs.
type Dash ¶
type Dash interface { ObjectPath(namespace, apiVersion, kind, name string) (string, error) ClusterClient() cluster.ClientInterface CRDWatcher() CRDWatcher ObjectStore() store.Store Logger() log.Logger PluginManager() plugin.ManagerInterface PortForwarder() portforward.PortForwarder KubeConfigPath() string UseContext(ctx context.Context, contextName string) error ContextName() string Validate() error }
Config is configuration for dash. It has knowledge of the all the major sections of dash.
type Live ¶
type Live struct {
// contains filtered or unexported fields
}
Live is a live version of dash config.
func NewLiveConfig ¶
func NewLiveConfig( clusterClient cluster.ClientInterface, crdWatcher CRDWatcher, kubeConfigPath string, logger log.Logger, moduleManager module.ManagerInterface, objectStore store.Store, pluginManager plugin.ManagerInterface, portForwarder portforward.PortForwarder, currentContextName string, restConfigOptions cluster.RESTConfigOptions, ) *Live
NewLiveConfig creates an instance of Live.
func (*Live) ClusterClient ¶
func (l *Live) ClusterClient() cluster.ClientInterface
ClusterClient returns a cluster client.
func (*Live) ContextName ¶
ContextName returns the current context name
func (*Live) KubeConfigPath ¶
KubeConfigPath returns the kube config path.
func (*Live) ObjectPath ¶
ObjectPath returns the path given an object description.
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) UseContext ¶
UseContext switches context name.
type ObjectHandler ¶
type ObjectHandler func(ctx context.Context, object *unstructured.Unstructured)
ObjectHandler is a function that is run when a new object is available.