Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SubscribeOn ¶
func SubscribeOn(p Subscribable, topic Topic, notifee Notifee)
SubscribeOn subscribes to the given subscribe on the given topic, but maps to a differnt topic specified in a notifee which has a mappable subscriber
Types ¶
type Event ¶
type Event interface{}
Event is a publishable event
func IdentityTransform ¶
IdentityTransform sets up an event transform that makes no changes
type EventTransform ¶
EventTransform if a fucntion transforms one kind of event to another
type MappableSubscriber ¶
type MappableSubscriber interface { Subscriber Map(sourceID Topic, destinationID Topic) }
MappableSubscriber is a subscriber that remaps events received to other topics and events
func NewMappableSubscriber ¶
func NewMappableSubscriber(sub Subscriber, eventTransform EventTransform) MappableSubscriber
NewMappableSubscriber produces a subscriber that will transform events and topics before passing them on to the given subscriber
type Notifee ¶
type Notifee struct { Topic Topic Subscriber MappableSubscriber }
Notifee is a mappable suscriber where you want events to appear on this specified topic (used to call SubscribeOn to setup a remapping)
type Publisher ¶
type Publisher interface { Close(Topic) Publish(Topic, Event) Shutdown() Subscribable }
Publisher is an publisher of events that can be subscribed to
func NewPublisher ¶
func NewPublisher() Publisher
NewPublisher returns a new message event publisher
type Subscribable ¶
type Subscribable interface { Subscribe(topic Topic, sub Subscriber) bool Unsubscribe(sub Subscriber) bool }
Subscribable is a stream that can be subscribed to
type Subscriber ¶
Subscriber is a subscriber that can receive events