Version: v0.25.1 Latest Latest

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

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




This section is empty.


This section is empty.


func ValidateKubeConfig added in v0.15.0

func ValidateKubeConfig(logger log.Logger, kubeConfig string, fs afero.Fs) (string, error)

ValidateKubeConfig returns a valid file list of kube config(s)


type ConfigWatcher added in v0.10.1

type ConfigWatcher struct {
	FileWatcher FileWatcher
	// contains filtered or unexported fields

ConfigWatcher watches kubernetes configurations.

func NewConfigWatcher added in v0.10.1

func NewConfigWatcher(wc WatcherConfig, options ...ConfigWatcherOption) (*ConfigWatcher, error)

NewConfigWatcher creates an instance of ConfigWatcher.

func (*ConfigWatcher) Add added in v0.10.1

func (cw *ConfigWatcher) Add(ctx context.Context, names ...string) error

Add adds file names to be watched.

func (*ConfigWatcher) Watch added in v0.10.1

func (cw *ConfigWatcher) Watch(ctx context.Context)

Watch runs the config watcher loop

type ConfigWatcherOption added in v0.10.1

type ConfigWatcherOption func(cw *ConfigWatcher)

ConfigWatcherOption is an option for configuration ConfigWatcher.

func ConfigWatcherFileWatcher added in v0.10.1

func ConfigWatcherFileWatcher(fw FileWatcher) ConfigWatcherOption

ConfigWatcherFileWatcher sets the file watcher for ConfigWatcher.

type DefaultFileWatcher added in v0.10.1

type DefaultFileWatcher struct {
	// contains filtered or unexported fields

DefaultFileWatcher wraps fsnotify.Watcher so it can adhere to the FileWatcher API.

func NewDefaultFileWatcher added in v0.10.1

func NewDefaultFileWatcher() (*DefaultFileWatcher, error)

NewDefaultFileWatcher creates an instance of DefaultFileWatcher.

func (*DefaultFileWatcher) Add added in v0.10.1

func (d *DefaultFileWatcher) Add(name string) error

Add adds a file name to be watched.

func (DefaultFileWatcher) Errors added in v0.10.1

func (d DefaultFileWatcher) Errors() chan error

Errors returns a channel of errors.

func (*DefaultFileWatcher) Events added in v0.10.1

func (d *DefaultFileWatcher) Events() chan fsnotify.Event

Events returns a channel of fsnotify events.

type FileWatcher added in v0.10.1

type FileWatcher interface {
	// Add adds a file to watch.
	Add(name string) error
	// Events returns a channel with fsnotify events.
	Events() chan fsnotify.Event
	// Errors returns errors.
	Errors() chan error

FileWatcher watches files.

type Options

type Options struct {
	BrowserPath            string
	BuildInfo              config.BuildInfo
	ClientBurst            int
	ClientQPS              float32
	Context                string
	DisableClusterOverview bool
	EnableMemStats         bool
	EnableOpenCensus       bool
	FrontendURL            string
	KubeConfig             string
	Listener               net.Listener
	Namespace              string
	Namespaces             []string
	UserAgent              string
	// contains filtered or unexported fields

type Runner added in v0.13.0

type Runner struct {
	// contains filtered or unexported fields

func NewRunner added in v0.13.0

func NewRunner(ctx context.Context, logger log.Logger, opts ...RunnerOption) (*Runner, error)

func (*Runner) Start added in v0.13.0

func (r *Runner) Start(startupCh, shutdownCh chan bool, opts ...RunnerOption) error

type RunnerOption added in v0.18.0

type RunnerOption struct {
	// contains filtered or unexported fields

func WithBrowserPath added in v0.18.0

func WithBrowserPath(browserPath string) RunnerOption

func WithBuildInfo added in v0.18.0

func WithBuildInfo(buildInfo config.BuildInfo) RunnerOption

func WithClientBurst added in v0.18.0

func WithClientBurst(burst int) RunnerOption

func WithClientQPS added in v0.18.0

func WithClientQPS(qps float32) RunnerOption

func WithClientUserAgent added in v0.18.0

func WithClientUserAgent(userAgent string) RunnerOption

func WithClusterClient added in v0.18.0

func WithClusterClient(client cluster.ClientInterface) RunnerOption

func WithContext added in v0.18.0

func WithContext(context string) RunnerOption

func WithDynamicSharedInformerFactory added in v0.18.0

func WithDynamicSharedInformerFactory(factory dynamicinformer.DynamicSharedInformerFactory) RunnerOption

WithDynamicSharedInformerFactory allows overriding the DynamicSharedInformerFactory that is used by the default ObjectStore implementation. This is used for embedded uses of Octant and testing. If the WithObjectStore option is provided, this option is ignored.

func WithFrontendURL added in v0.18.0

func WithFrontendURL(frontendURL string) RunnerOption

func WithKubeConfig added in v0.18.0

func WithKubeConfig(kubeConfig string) RunnerOption

func WithListener added in v0.18.0

func WithListener(listener net.Listener) RunnerOption

func WithMemStats added in v0.18.0

func WithMemStats() RunnerOption

func WithNamespace added in v0.18.0

func WithNamespace(namespace string) RunnerOption

func WithNamespaces added in v0.18.0

func WithNamespaces(namespaces []string) RunnerOption

func WithObjectStore added in v0.22.0

func WithObjectStore(objectStore store.Store) RunnerOption

WithObjectStore allows overriding the default ObjectStore implementation with a custom object store. This is for embedded uses of Octant and testing purposes. When using this option the WithDynamicSharedInformerFactory option is ignored.

func WithOpenCensus added in v0.18.0

func WithOpenCensus() RunnerOption

func WithStreamingClientFactory added in v0.22.0

func WithStreamingClientFactory(factory api.StreamingClientFactory) RunnerOption

func WithoutClusterOverview added in v0.18.0

func WithoutClusterOverview() RunnerOption

type WatcherConfig added in v0.10.1

type WatcherConfig interface {
	CurrentContext() string
	UseFSContext(ctx context.Context) error
	UseContext(ctx context.Context, name string) error

WatcherConfig is an interface with configuration for ConfigWatcher.


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