msgqueue

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DynamicEventMapper

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

func (*DynamicEventMapper) MapEvent

func (e *DynamicEventMapper) MapEvent(eventName string, serialized interface{}) (Event, error)

func (*DynamicEventMapper) RegisterMapping

func (e *DynamicEventMapper) RegisterMapping(eventType reflect.Type) error

type Event

type Event interface {
	// PartitionKey() string
	EventName() string
}

type EventEmitter

type EventEmitter interface {
	Emit(event Event) error
}

type EventListener

type EventListener interface {
	Listen(events ...string) (<-chan Event, <-chan error, error)
	Mapper() EventMapper
}

EventListener describes an interface for a class that can listen to events.

type EventMapper

type EventMapper interface {
	MapEvent(string, interface{}) (Event, error)
}

func NewDynamicEventMapper

func NewDynamicEventMapper() EventMapper

func NewEventMapper

func NewEventMapper() EventMapper

type StaticEventMapper

type StaticEventMapper struct{}

func (*StaticEventMapper) MapEvent

func (e *StaticEventMapper) MapEvent(eventName string, serialized interface{}) (Event, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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