dash

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2020 License: Apache-2.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, logger log.Logger, shutdownCh chan bool, options Options) error

Run runs the dashboard.

Types

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 {
	EnableOpenCensus       bool
	DisableClusterOverview bool
	KubeConfig             string
	Namespace              string
	FrontendURL            string
	Context                string
	ClientQPS              float32
	ClientBurst            int
	UserAgent              string
}

type WatcherConfig added in v0.10.1

type WatcherConfig interface {
	ContextName() string
	UseContext(ctx context.Context, name string) error
}

WatcherConfig is an interface with configuration for ConfigWatcher.

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