Documentation ¶
Index ¶
- func WithLogger(logger logger.Logger) func(*NATSEventSource)
- type NATSEventSource
- func (n *NATSEventSource) Cleanup() error
- func (n *NATSEventSource) OnSubscriptionUpdate(subj []models.EventSubscription)
- func (n *NATSEventSource) Sender() types.EventSender
- func (n *NATSEventSource) Start(ctx context.Context, registrationData types.RegistrationData, ...) error
- func (n *NATSEventSource) Stop() error
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
Click to show internal directories.
Click to hide internal directories.