events

package
v0.0.0-...-edfa39e Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultTimeout = 2 * time.Second
	DefaultPeriod  = 100 * time.Millisecond
)

Variables

This section is empty.

Functions

func ChannelHandler

func ChannelHandler(ch chan resource.Event) resource.EventHandler

ChannelHandler creates an EventHandler that adds the event to the provided channel.

func Expect

func Expect(t *testing.T, ch chan resource.Event, options ...retry.Option) resource.Event

Expect polls the channel for the next event and returns it. Fails the test if no event found.

func ExpectNone

func ExpectNone(t *testing.T, ch chan resource.Event, options ...retry.Option)

ExpectNone polls the channel and fails the test if any events are available.

func ExpectOne

func ExpectOne(t *testing.T, ch chan resource.Event, options ...retry.Option) resource.Event

ExpectOne polls the channel and ensures that only a single event is available. Fails the test if the number of events != 1.

func Poll

func Poll(ch chan resource.Event, options ...retry.Option) *resource.Event

Poll polls the channel to see if there is an event waiting. Returns either the next event or nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

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