processor

package
v0.0.0-...-0be70c8 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: GPL-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package processor contains the code which will actually poll the list of URLs the user is watching, and send emails for those entries which are new.

Items which are excluded are treated the same as normal items, in the sense they are processed once and then marked as having been seen - the only difference is no email is actually generated for them.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Processor

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

Processor stores our state

func New

func New() (*Processor, error)

New creates a new Processor object.

This might return an error if we fail to open the database we use for maintaining state.

func (*Processor) Close

func (p *Processor) Close()

Close should be called to cleanup our internal database-handle.

func (*Processor) ProcessFeeds

func (p *Processor) ProcessFeeds(recipients []string) []error

ProcessFeeds is the main workhorse here, we process each feed and send emails appropriately.

func (*Processor) SetLogger

func (p *Processor) SetLogger(logger *slog.Logger)

SetLogger ensures we have a logging-handle

func (*Processor) SetSendEmail

func (p *Processor) SetSendEmail(state bool)

SetSendEmail updates the state of this object, when the send-flag is false zero emails are generated.

Directories

Path Synopsis
Package emailer is responsible for sending out a feed item via email.
Package emailer is responsible for sending out a feed item via email.

Jump to

Keyboard shortcuts

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