Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrPublishEvent = errors.New("publishing event went wrong")
Functions ¶
func GetNATSTestInstance ¶
func GetNATSTestInstance(callback func(*nats.Conn))
Types ¶
type StreamPublisher ¶
type StreamPublisher interface {
Publish(event *eventsv1.StreamEvent) error
}
func NewStreamPublisher ¶
func NewStreamPublisher(nc *nats.Conn) (StreamPublisher, error)
type StreamSubscribedUser ¶
type StreamSubscribedUser struct { UserID model.UserID UserPipe chan *eventsv1.SubscribeEventsStreamResponse }
type StreamSubscriber ¶
type StreamSubscriber interface { UserSubscribe(userID model.UserID, userCh chan *eventsv1.SubscribeEventsStreamResponse) UserUnsubscribe(userID model.UserID) }
func NewStreamSubscriber ¶
func NewStreamSubscriber(nc *nats.Conn, logger *log.SubLogger) (StreamSubscriber, error)
Click to show internal directories.
Click to hide internal directories.