config

package
v0.25.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
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

func (l *Live) BuildInfo() (string, string, string)

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

func (l *Live) CurrentContext() string

CurrentContext returns the current context name

func (*Live) DefaultNamespace

func (l *Live) DefaultNamespace() string

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 (l *Live) KubeConfigPath() string

func (*Live) Logger

func (l *Live) Logger() log.Logger

Logger returns a logger.

func (*Live) ModuleManager

func (l *Live) ModuleManager() module.ManagerInterface

func (*Live) ObjectPath

func (l *Live) ObjectPath(namespace, apiVersion, kind, name string) (string, error)

ObjectPath returns the path given an object description.

func (*Live) ObjectStore

func (l *Live) ObjectStore() store.Store

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 (l *Live) SetContextChosenInUI(contextChosen bool)

func (*Live) UseContext

func (l *Live) UseContext(ctx context.Context, contextName string) error

UseContext switches context name. This process should have synchronously.

func (*Live) UseFSContext added in v0.18.0

func (l *Live) UseFSContext(ctx context.Context) error

func (*Live) Validate

func (l *Live) Validate() error

Validate validates the configuration and returns an error if there is an issue.

Directories

Path Synopsis
Package fake is a generated GoMock package.
Package fake is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL