Documentation ¶
Index ¶
- func New() eventbus.EventBus
- type InMemoryEventBus
- func (imeb InMemoryEventBus) CreateConsumer(topicID string, listener eventbus.MessageListener) error
- func (imeb InMemoryEventBus) DeleteConsumer(topicID string, messageListenerID string) error
- func (imeb InMemoryEventBus) GetCacheValue(key string) (interface{}, error)
- func (InMemoryEventBus) GetEventBusID() string
- func (imeb InMemoryEventBus) PublishMessage(message eventbus.Message) error
- func (imeb InMemoryEventBus) SendMessage(message eventbus.Message) error
- func (imeb InMemoryEventBus) SetCacheValue(key string, value interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type InMemoryEventBus ¶
type InMemoryEventBus struct {
// contains filtered or unexported fields
}
Local implementation of EventBus which uses no networking resources
func (InMemoryEventBus) CreateConsumer ¶
func (imeb InMemoryEventBus) CreateConsumer(topicID string, listener eventbus.MessageListener) error
CreateConsumer creates and registers a consumer which reacts to messages published to the same instance of InMemoryEventBus
func (InMemoryEventBus) DeleteConsumer ¶
func (imeb InMemoryEventBus) DeleteConsumer(topicID string, messageListenerID string) error
DeleteConsumer removes the specified consumer from receiving messages published to the same instance of InMemoryEventBus
func (InMemoryEventBus) GetCacheValue ¶
func (imeb InMemoryEventBus) GetCacheValue(key string) (interface{}, error)
GetCacheValue gets the value from InMemoryEventBus' cache associated with the specified key
func (InMemoryEventBus) GetEventBusID ¶
func (InMemoryEventBus) GetEventBusID() string
GetEventBusID gets the event bus ID
func (InMemoryEventBus) PublishMessage ¶
func (imeb InMemoryEventBus) PublishMessage(message eventbus.Message) error
PublishMessage published a message to all registered consumers listening to the same topicID on the same instance of InMemoryEventBus
func (InMemoryEventBus) SendMessage ¶
func (imeb InMemoryEventBus) SendMessage(message eventbus.Message) error
func (InMemoryEventBus) SetCacheValue ¶
func (imeb InMemoryEventBus) SetCacheValue(key string, value interface{}) error
SetCacheValue updates the InMemoryEventBus' cache with the specified key value pair