Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertStop ¶
func AssertStop(c *C, stopper Stopper)
Types ¶
type NotifyWatcher ¶
type NotifyWatcher interface {
Changes() <-chan struct{}
}
type NotifyWatcherC ¶
type NotifyWatcherC struct { *C State *state.State Watcher NotifyWatcher FullSync bool }
NotifyWatcherC embeds a gocheck.C and adds methods to help verify the behaviour of any watcher that uses a <-chan struct{}.
func NewLaxNotifyWatcherC ¶
func NewLaxNotifyWatcherC(c *C, st *state.State, w NotifyWatcher) NotifyWatcherC
NewLaxNotifyWatcherC returns a NotifyWatcherC that runs a full watcher sync before reading from the watcher's Changes channel, and hence cannot verify real-world coalescence behaviour.
func NewNotifyWatcherC ¶
func NewNotifyWatcherC(c *C, st *state.State, w NotifyWatcher) NotifyWatcherC
NewNotifyWatcherC returns a NotifyWatcherC that checks for aggressive event coalescence.
func (NotifyWatcherC) AssertClosed ¶
func (c NotifyWatcherC) AssertClosed()
func (NotifyWatcherC) AssertNoChange ¶
func (c NotifyWatcherC) AssertNoChange()
func (NotifyWatcherC) AssertOneChange ¶
func (c NotifyWatcherC) AssertOneChange()
type StringsWatcher ¶
type StringsWatcherC ¶
type StringsWatcherC struct { *C State *state.State Watcher StringsWatcher FullSync bool }
StringsWatcherC embeds a gocheck.C and adds methods to help verify the behaviour of any watcher that uses a <-chan []string.
func NewLaxStringsWatcherC ¶
func NewLaxStringsWatcherC(c *C, st *state.State, w StringsWatcher) StringsWatcherC
NewLaxStringsWatcherC returns a StringsWatcherC that runs a full watcher sync before reading from the watcher's Changes channel, and hence cannot verify real-world coalescence behaviour.
func NewStringsWatcherC ¶
func NewStringsWatcherC(c *C, st *state.State, w StringsWatcher) StringsWatcherC
NewStringsWatcherC returns a StringsWatcherC that checks for aggressive event coalescence.
func (StringsWatcherC) AssertClosed ¶
func (c StringsWatcherC) AssertClosed()
func (StringsWatcherC) AssertNoChange ¶
func (c StringsWatcherC) AssertNoChange()
func (StringsWatcherC) AssertOneChange ¶
func (c StringsWatcherC) AssertOneChange(expect ...string)