juju: github.com/juju/juju/state/watcher/watchertest Index | Files

package watchertest

import "github.com/juju/juju/state/watcher/watchertest"

Index

Package Files

notify.go strings.go

type NotifyWatcher Uses

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

func NewNotifyWatcher Uses

func NewNotifyWatcher(ch <-chan struct{}) *NotifyWatcher

func (*NotifyWatcher) Changes Uses

func (w *NotifyWatcher) Changes() <-chan struct{}

func (*NotifyWatcher) Err Uses

func (w *NotifyWatcher) Err() error

func (*NotifyWatcher) Kill Uses

func (w *NotifyWatcher) Kill()

func (*NotifyWatcher) KillErr Uses

func (w *NotifyWatcher) KillErr(err error)

KillErr can be used to kill the worker with an error, to simulate a failing watcher.

func (*NotifyWatcher) Stop Uses

func (w *NotifyWatcher) Stop() error

func (*NotifyWatcher) Wait Uses

func (w *NotifyWatcher) Wait() error

type StringsWatcher Uses

type StringsWatcher struct {
    T   tomb.Tomb
    C   chan []string
}

StringsWatcher is an implementation of state.StringsWatcher that can be manipulated, for testing.

func NewStringsWatcher Uses

func NewStringsWatcher(ch chan []string) *StringsWatcher

NewStringsWatcher returns a new StringsWatcher that returns the given channel in its "Changes" method. NewStringsWatcher takes ownership of the channel, closing it when it is stopped.

func (*StringsWatcher) Changes Uses

func (w *StringsWatcher) Changes() <-chan []string

Changes is part of the state.StringsWatcher interface.

func (*StringsWatcher) Err Uses

func (w *StringsWatcher) Err() error

Err is part of the state.StringsWatcher interface.

func (*StringsWatcher) Kill Uses

func (w *StringsWatcher) Kill()

Kill is part of the state.StringsWatcher interface.

func (*StringsWatcher) Stop Uses

func (w *StringsWatcher) Stop() error

Stop is part of the state.StringsWatcher interface.

func (*StringsWatcher) Wait Uses

func (w *StringsWatcher) Wait() error

Wait is part of the state.StringsWatcher interface.

Package watchertest imports 1 packages (graph). Updated 2018-07-01. Refresh now. Tools for package owners.