local

package
v0.0.0-...-fb40f1a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() eventbus.EventBus

New creates an instance of InMemoryEventBus

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL