mocks

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Anything is used where the expectation should not be considered.
	Anything = "mocks.Anything"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ChildMessage added in v1.1.0

type ChildMessage struct {
	Index int
	Msg   *streams.Message
}

ChildMessage represents a message forwarded to a child index.

type Pipe

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

Pipe is a mock Pipe.

func NewPipe

func NewPipe(t *testing.T) *Pipe

NewPipe create a new mock Pipe instance.

func (*Pipe) AssertExpectations

func (p *Pipe) AssertExpectations()

AssertExpectations asserts that the expectations were met.

func (*Pipe) Commit

func (p *Pipe) Commit(msg *streams.Message) error

Commit commits the current state in the sources.

func (*Pipe) ExpectCommit

func (p *Pipe) ExpectCommit()

ExpectCommit registers an expectation of a Commit the Pipe.

func (*Pipe) ExpectForward

func (p *Pipe) ExpectForward(k, v interface{})

ExpectForward registers an expectation of a Forward of the Pipe.

func (*Pipe) ExpectForwardToChild

func (p *Pipe) ExpectForwardToChild(k, v interface{}, index int)

ExpectForwardToChild registers an expectation of a ForwardToChild the Pipe.

func (*Pipe) Forward

func (p *Pipe) Forward(msg *streams.Message) error

Forward queues the data to all processor children in the topology.

func (*Pipe) ForwardToChild

func (p *Pipe) ForwardToChild(msg *streams.Message, index int) error

ForwardToChild queues the data to the the given processor(s) child in the topology.

func (*Pipe) Messages added in v1.1.0

func (p *Pipe) Messages() []ChildMessage

Messages gets the queued Messages for each Node.

func (*Pipe) ShouldError

func (p *Pipe) ShouldError()

ShouldError indicates that an error should be returned on the next operation.

Jump to

Keyboard shortcuts

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