rssfetcher

package
v0.0.0-...-ff4bf11 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const RssTimeout = 30 * time.Second

Variables

View Source
var ErrClosed = errors.New("RssFetcher already closed")

ErrClosed is returned when attempting to start a closed RssFetcher

Functions

This section is empty.

Types

type RssFetcher

type RssFetcher interface {
	// Run begins fetching RSS feeds and only stops when closed or when
	// encountering an unrecoverable error.
	Run() error
	// Close stops a running RssFetcher and cleans up.
	Close() error
	// InformFeedChanged informs the fetcher that a feed has changed
	InformFeedChanged()
	// RerunFeed immediately fetches a feed if it is waiting between fetches or after an error
	RerunFeed(int64)
	// RerunFailing immediately reruns all failing feeds without waiting for backoff
	RerunFailing()
}

RssFetcher is responsible for reading fetching feeds and storing them in the database

func NewRssFetcher

func NewRssFetcher(conf config.Config,
	db *database.Database) (RssFetcher, error)

NewRssFetcher returns a new RssFetcher

Jump to

Keyboard shortcuts

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