config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ExcludeList           map[string][]string `json:"excludeList,omitempty"`
	Resources             sysinfo.Config      `json:"resources,omitempty"`
	TopologyManagerPolicy string              `json:"topologyManagerPolicy,omitempty"`
	TopologyManagerScope  string              `json:"topologyManagerScope,omitempty"`
}

func ReadConfig

func ReadConfig(configPath string) (Config, error)

type Watcher

type Watcher struct {
	// contains filtered or unexported fields
}

func NewWatcher

func NewWatcher(configPath string, callback func() error) (*Watcher, error)

func (*Watcher) Close

func (cw *Watcher) Close()

func (*Watcher) Stop

func (cw *Watcher) Stop()

func (*Watcher) WaitUntilChanges

func (cw *Watcher) WaitUntilChanges()

WaitUntilChanges wait until it notices the first change of the config file. It nevers rearm itself, so it fires at most once. Make sure this run on a separate (not main) goroutine: see https://github.com/fsnotify/fsnotify#faq

Jump to

Keyboard shortcuts

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