memory

package
v0.0.0-...-33ef150 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Data

func Data(d []byte) config.SourceOption

Types

type Source

type Source struct {
	sync.RWMutex
	ChangeSet *config.ChangeSet
	Watchers  map[string]*Watcher
}

func NewSource

func NewSource(opts ...config.SourceOption) *Source

func (*Source) Read

func (s *Source) Read() (*config.ChangeSet, error)

func (*Source) String

func (s *Source) String() string

func (*Source) Update

func (s *Source) Update(data []byte)

Update allows manual updates of the config data.

func (*Source) Watch

func (s *Source) Watch() (config.SourceWatcher, error)

type Watcher

type Watcher struct {
	Id      string
	Updates chan *config.ChangeSet
	Source  *Source
}

func (*Watcher) Next

func (w *Watcher) Next() (*config.ChangeSet, error)

func (*Watcher) Stop

func (w *Watcher) Stop() error

Jump to

Keyboard shortcuts

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