natsmailproviderevents

package
v0.0.0-...-6531ba9 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Listener

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

Listener is a mail provider event listener on NATS.

func NewListener

func NewListener(dependencies *mailing.Dependencies, eventHandler mailproviderevents.EventHandler) (*Listener, error)

NewListener creates a new event Listener.

func (*Listener) Start

func (l *Listener) Start(ctx context.Context) error

Start listening for the NATS mail provider events.

func (*Listener) Stop

func (l *Listener) Stop() error

Stop listening for the NATS mail provider events.

type Publisher

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

func NewPublisher

func NewPublisher(dependencies *mailing.Dependencies) (*Publisher, error)

NewPublisher creates a new event Publisher.

func (*Publisher) PublishCurrentMailingProviderReplaced

func (p *Publisher) PublishCurrentMailingProviderReplaced(ctx context.Context, in *mailingpb.EventCurrentMailingProviderReplaced) error

func (*Publisher) PublishCurrentMailingProviderUpdated

func (p *Publisher) PublishCurrentMailingProviderUpdated(ctx context.Context, in *mailingpb.EventCurrentMailingProviderUpdated) error

PublishCurrentMailingProviderUpdated publishes a provider updated event.

Jump to

Keyboard shortcuts

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