bus_golang_subscriber_zmq

package module
v0.0.0-...-5e6f834 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

README

Documentation

Index

Constants

View Source
const (
	TopicAndPayloadDelimiter        byte = 0
	TopicPrefixAndEventKeyDelimiter byte = 1
	TopicPrefixFormat                    = "%s:v%d" + string(TopicPrefixAndEventKeyDelimiter)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Subscriber

type Subscriber[Payload proto.Message] struct {
	// contains filtered or unexported fields
}

func New

func New[Payload proto.Message](
	eventName bus.EventName,
	eventVersion bus.EventVersion,
	publishersRegistryWatcher bus.PublishersRegistry,
	payloadFactory func() Payload,
	errorHandler func(error),
) (*Subscriber[Payload], error)

func (*Subscriber[Payload]) EventsChan

func (s *Subscriber[Payload]) EventsChan() <-chan bus.Event[Payload]

func (*Subscriber[Payload]) Stop

func (s *Subscriber[Payload]) Stop() error

func (*Subscriber[Payload]) Subscribe

func (s *Subscriber[Payload]) Subscribe(eventFilter bus.EventFilter) error

func (*Subscriber[Payload]) Unsubscribe

func (s *Subscriber[Payload]) Unsubscribe(eventFilter bus.EventFilter) error

Jump to

Keyboard shortcuts

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