msgconsumer

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2020 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package msgconsumer reads and sends SMS/Email messages from a repository.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigOption

type ConfigOption func(*service)

ConfigOption configures the service.

func WithLogger

func WithLogger(l log.Logger) ConfigOption

WithLogger configures the service with a logger.

func WithWorkers

func WithWorkers(w int) ConfigOption

WithWorkers determines the total number of workers to process a message queue.

type Consumer

type Consumer interface {
	Run(ctx context.Context) error
}

Consumer reads a message stream from a repository.

func NewService

func NewService(r auth.MessageRepository, smsLib auth.SMSer, emailLib auth.Emailer, options ...ConfigOption) Consumer

NewService returns a new Consumer

Jump to

Keyboard shortcuts

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