core

package
v0.0.0-...-1d5aa86 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2020 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ScatterGather

func ScatterGather(ctx context.Context, configs []config.Feed, goodboy Fetcher) ([][]Entry, []error)

ScatterGather uses a given Fetcher to fetch feeds concurrently.

Types

type Entry

type Entry struct {
	Feed      string
	Title     string
	Link      *url.URL
	Published time.Time
}

func HTTPFetcher

func HTTPFetcher(ctx context.Context, f config.Feed) ([]Entry, error)

HTTPFetcher fetches feeds over HTTP.

func Parse

func Parse(cfg config.Feed, raw io.Reader) ([]Entry, error)

type Fetcher

type Fetcher func(context.Context, config.Feed) ([]Entry, error)

Fetcher fetches a Feed based on a config.

type SortedEntries

type SortedEntries []Entry

func (SortedEntries) Len

func (p SortedEntries) Len() int

func (SortedEntries) Less

func (p SortedEntries) Less(i, j int) bool

func (SortedEntries) Swap

func (p SortedEntries) Swap(i, j int)

Jump to

Keyboard shortcuts

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