nats

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithLogger

func WithLogger(logger logger.Logger) func(*NATSEventSource)

WithLogger sets the logger to use

Types

type NATSEventSource

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

NATSEventSource is an implementation of EventSource that is using the NATS event broker internally

func New

func New(natsConnector natseventsource.NATS, opts ...func(source *NATSEventSource)) *NATSEventSource

New creates a new NATSEventSource

func (*NATSEventSource) Cleanup

func (n *NATSEventSource) Cleanup() error

func (*NATSEventSource) OnSubscriptionUpdate

func (n *NATSEventSource) OnSubscriptionUpdate(subj []models.EventSubscription)

func (*NATSEventSource) Sender

func (n *NATSEventSource) Sender() types.EventSender

func (*NATSEventSource) Start

func (n *NATSEventSource) Start(ctx context.Context, registrationData types.RegistrationData, eventChannel chan types.EventUpdate, errChan chan error, wg *sync.WaitGroup) error

func (*NATSEventSource) Stop

func (n *NATSEventSource) Stop() error

Jump to

Keyboard shortcuts

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