loader

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 3, 2017 License: Apache-2.0 Imports: 11 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IFace

type IFace interface {
	// @return Snapshot the current snapshot. This reference is safe to use forever, but will grow
	//         stale so should not be stored beyond when it is immediately needed.
	Snapshot() snapshot.IFace

	// Add a channel that will be written to when a new snapshot is available. "1" will be written
	// to the channel as a sentinel.
	// @param callback supplies the callback to add.
	AddUpdateCallback(callback chan<- int)
}

func New

func New(runtimePath string, runtimeSubdirectory string, scope stats.Scope) IFace

type Loader

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

Implementation of Loader that watches a symlink and reads from the filesystem.

func (*Loader) AddUpdateCallback

func (l *Loader) AddUpdateCallback(callback chan<- int)

func (*Loader) Snapshot

func (l *Loader) Snapshot() snapshot.IFace

type Nil

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

Implementation of Loader with no backing store.

func NewNil

func NewNil() (n *Nil)

func (*Nil) AddUpdateCallback

func (n *Nil) AddUpdateCallback(callback chan<- int)

func (*Nil) Snapshot

func (n *Nil) Snapshot() snapshot.IFace

Jump to

Keyboard shortcuts

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