watcher

package
v0.0.0-...-12def25 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2017 License: Apache-2.0 Imports: 8 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Watcher

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

Watcher syncs updates from etcd into a given FlagSet.

func New

func New(set *flag.FlagSet, keysApi etcd.KeysAPI, etcdPath string, logger loggerCompatible) (*Watcher, error)

New constructs a new Watcher

func (*Watcher) Initialize

func (u *Watcher) Initialize() error

Initialize performs the initial read of etcd and sets all flags (dynamic and static) into FlagSet.

func (*Watcher) Start

func (u *Watcher) Start() error

Start kicks off the go routine that syncs dynamic flags from etcd to FlagSet.

func (*Watcher) Stop

func (u *Watcher) Stop() error

Stops the auto-updating go-routine.

Jump to

Keyboard shortcuts

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