eventbus

package module
v0.0.0-...-6e616bb Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2021 License: MIT Imports: 4 Imported by: 0

README

eventbus

Work in progress

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AzureServiceBus

type AzureServiceBus struct {
	// contains filtered or unexported fields
}

func (*AzureServiceBus) Init

func (t *AzureServiceBus) Init()

func (*AzureServiceBus) Publish

func (t *AzureServiceBus) Publish(event *EventContainer)

func (*AzureServiceBus) Subscribe

func (t *AzureServiceBus) Subscribe(subscriber *Subscriber) error

type EventBus

type EventBus interface {
	Init()
	Publish(event *EventContainer)
	Subscribe(subscriber *Subscriber) error
}

EventBus is base implementation of IEventBus

type EventContainer

type EventContainer struct {
	Metadata *map[string]interface{}
	Payload  interface{}
	// contains filtered or unexported fields
}

func NewEventContainer

func NewEventContainer(name string, topicName string, payload interface{}, metadata *map[string]interface{}) *EventContainer

func NewEventContainerReflected

func NewEventContainerReflected(payload interface{}, metadata *map[string]interface{}) *EventContainer

func (*EventContainer) GetName

func (e *EventContainer) GetName() string

func (*EventContainer) GetTopicName

func (e *EventContainer) GetTopicName() string

type Memory

type Memory struct {
	// contains filtered or unexported fields
}

Memory EventBus implementation

func (*Memory) Init

func (t *Memory) Init()

func (*Memory) Publish

func (t *Memory) Publish(event *EventContainer)

func (*Memory) Subscribe

func (t *Memory) Subscribe(subscriber *Subscriber) error

type Subscriber

type Subscriber interface {
	GetEventName() string
	GetEventType() reflect.Type
	GetTopicName() string
	AcceptEvent(event interface{})
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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