stream

package
v0.0.0-...-4c36365 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

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))

func NewNATSAdapter

func NewNATSAdapter(config *config.Nats, logger *log.SubLogger) (*nats.Conn, error)

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)

Jump to

Keyboard shortcuts

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