Documentation ¶
Index ¶
- Constants
- type ChildMessage
- type Pipe
- func (p *Pipe) AssertExpectations()
- func (p *Pipe) Commit(msg streams.Message) error
- func (p *Pipe) ExpectCommit()
- func (p *Pipe) ExpectForward(k, v interface{})
- func (p *Pipe) ExpectForwardToChild(k, v interface{}, index int)
- func (p *Pipe) ExpectMark(k, v interface{})
- func (p *Pipe) Forward(msg streams.Message) error
- func (p *Pipe) ForwardToChild(msg streams.Message, index int) error
- func (p *Pipe) Mark(msg streams.Message) error
- func (p *Pipe) Messages() []ChildMessage
- func (p *Pipe) ShouldError()
- type Predicate
- type Source
Constants ¶
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 ¶
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 (*Pipe) AssertExpectations ¶
func (p *Pipe) AssertExpectations()
AssertExpectations asserts that the expectations were met.
func (*Pipe) ExpectCommit ¶
func (p *Pipe) ExpectCommit()
ExpectCommit registers an expectation of a Commit on the Pipe.
func (*Pipe) ExpectForward ¶
func (p *Pipe) ExpectForward(k, v interface{})
ExpectForward registers an expectation of a Forward on the Pipe.
func (*Pipe) ExpectForwardToChild ¶
ExpectForwardToChild registers an expectation of a ForwardToChild on the Pipe.
func (*Pipe) ExpectMark ¶
func (p *Pipe) ExpectMark(k, v interface{})
ExpectMark registers an expectation of a Mark on the Pipe.
func (*Pipe) ForwardToChild ¶
ForwardToChild queues the data to the the given processor(s) child in the topology.
func (*Pipe) Messages ¶
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.
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
Source is a test source to be used with streams command-level tests. It allows consumption of provided set of messages and counts commits. Once the counted commits reach expected level an exit signal is emitted.
func (*Source) Commit ¶
Commit marks the consumed records as processed. Once the counted commits reach expected level an exit signal is emitted.