Documentation ¶
Overview ¶
Package memory provides an in-memory repository for messages
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
Repository is the in-memory data structure to store messages
func NewRepository ¶
func NewRepository() *Repository
NewRepository is a factory that returns an instantiated in-memory repository
func (*Repository) Add ¶
func (r *Repository) Add(message *message.Message)
Add stores a message in the Repository
func (*Repository) GetAll ¶
func (r *Repository) GetAll() (messages []*message.Message)
GetAll returns all messages
func (*Repository) GetQueue ¶
func (r *Repository) GetQueue() *message.Message
GetQueue returns a channel to recieve messages from
Click to show internal directories.
Click to hide internal directories.