Documentation ¶
Overview ¶
Package inmem is an in-memory, "dummy" implementation of the broker API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchSpawnIterator ¶
type BatchSpawnIterator struct { Messages []broker.Message AmountToReturn int BatchSize int Timeout time.Duration ErrorToReturn error }
BatchSpawnIterator is a batched variant of MessageSpawnIterator.
type MessageSpawnIterator ¶
type MessageSpawnIterator struct { Messages []broker.Message AmountToReturn int Timeout time.Duration ErrorToReturn error }
MessageSpawnIterator returns messages with incrementing IDs starting 0 and going to AmountToReturn-1. The messages are also stored in an internal slice.
func (*MessageSpawnIterator) NextMessage ¶
NextMessage returns a message and can block for Timeout to simulate some delay. When the IDs are exhausted, it returns a predefined error (for example, context.Canceled).
type Publisher ¶
type Publisher struct { Spawned []*Topic // contains filtered or unexported fields }
func (*Publisher) GetAllPublished ¶
func (p *Publisher) GetAllPublished() []broker.OutboundMessage
func (*Publisher) MatchesPublished ¶
type Topic ¶
type Topic struct { TopicID string Published []broker.OutboundMessage // contains filtered or unexported fields }
func (*Topic) BatchPublish ¶
Click to show internal directories.
Click to hide internal directories.