1
// Copyright 2013 Canonical Ltd.
2
// Licensed under the AGPLv3, see LICENCE file for details.
9
"github.com/juju/juju/state"
12
// FakeNotifyWatcher is an implementation of state.NotifyWatcher which
13
// is useful in tests.
14
type FakeNotifyWatcher struct {
19
var _ state.NotifyWatcher = (*FakeNotifyWatcher)(nil)
21
func NewFakeNotifyWatcher() *FakeNotifyWatcher {
22
return &FakeNotifyWatcher{
23
C: make(chan struct{}, 1),
27
func (w *FakeNotifyWatcher) Stop() error {
32
func (w *FakeNotifyWatcher) Kill() {
37
func (w *FakeNotifyWatcher) Wait() error {
41
func (w *FakeNotifyWatcher) Err() error {
45
func (w *FakeNotifyWatcher) Changes() <-chan struct{} {