Documentation ¶
Overview ¶
Package streamtest provides utilities for stream testing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MockProcessor ¶
type MockProcessor struct {
// contains filtered or unexported fields
}
MockProcessor mocks a stream processor with a predefined set of messages. It implements the interface stream.Processor.
func NewMockProcessor ¶
func NewMockProcessor(msgs []stream.Message) *MockProcessor
NewMockProcessor returns a MockProcessor. It initializes its internal list of messages with msgs.
func (*MockProcessor) Process ¶
func (mp *MockProcessor) Process(ctx context.Context, entity string, h stream.MsgHandler) error
Process processes the messages passed to NewMockProcessor.
Click to show internal directories.
Click to hide internal directories.