reader

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module = fx.Provide(
	NewReader,
)

Module provides all of the dependencies required by the reader module

Functions

func Run

func Run(reader Reader)

Run is a function to be used in invoke to start the server running.

Types

type Reader

type Reader struct {
	Queue      pubsub.Subscriber
	Logger     *zap.Logger
	Shutdowner fx.Shutdowner
}

Reader reads from an SQS Queue and logs out the messages

func NewReader

func NewReader(
	queue pubsub.Subscriber,
	logger *zap.Logger,
	shutdowner fx.Shutdowner,
) Reader

NewReader is the constructor of the reader type

func (Reader) Run

func (r Reader) Run()

Run starts the reader reading messages and logs them out, it will shutdown the server if the queue doesn't return any more messages

Jump to

Keyboard shortcuts

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