Documentation ¶
Overview ¶
Package river aggregates feeds into a riverjs file.
See http://riverjs.org for more information on the format.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultOptions = Options{ Mapping: mapping.DefaultMapping, CutOff: -24 * time.Hour, Refresh: 15 * time.Minute, LogLength: 0, }
DefaultOptions are some sensible options to start out with.
Functions ¶
Types ¶
type Options ¶
type Options struct { // Mapping is the function used to convert a feed item to an item in the // river. Mapping mapping.Mapping // CutOff is the duration after which items are not shown in the river. This // is given as a negative time and is calculated from the time the feed was // fetched not the time the item was published. CutOff time.Duration // Refresh is the minimum refresh period. If an rss feed does not specify // when to be fetched this duration will be used. Refresh time.Duration // LogLength defines the number of events to keep in the crawl log, per feed. LogLength int }
Options change the behaviour of River.
type River ¶
type River interface { Latest() (riverjs.River, error) // Log returns a list of fetch events. Log() []events.Event // Add subscribes the river to the feed at uri. Add(uri string) // Remove unsubscribes the river from the feed at url. Remove(uri string) // Close gracefully stops feeds from being checked. Close() error }
A River aggregates feeds that it is subscribed to, and writes them in riverjs format.
Directories ¶
Path | Synopsis |
---|---|
Package confluence manages a list of subscribed feeds.
|
Package confluence manages a list of subscribed feeds. |
Package data provides the ability to rebuild previous feeds and remove duplicate items.
|
Package data provides the ability to rebuild previous feeds and remove duplicate items. |
boltdata
Package boltdata implements data over a bolt database.
|
Package boltdata implements data over a bolt database. |
memdata
Package memdata implements data over a set of in memory maps.
|
Package memdata implements data over a set of in memory maps. |
Package events keeps track of the results of fetching feeds.
|
Package events keeps track of the results of fetching feeds. |
Package mapping converts a feed item into a riverjs item.
|
Package mapping converts a feed item into a riverjs item. |
Package riverjs contains structs that map to the parts of a riverjs feed.
|
Package riverjs contains structs that map to the parts of a riverjs feed. |
Package tributary fetches a single feed.
|
Package tributary fetches a single feed. |
Click to show internal directories.
Click to hide internal directories.