Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Aggregator ¶
type Aggregator interface { // Start should start a goroutine that periodically fetches content from // Instagram and updates the local database accordingly. Start(interval time.Duration) error // Stop should stop the periodical update and free resources. Stop() }
Aggregator defines the primitives required for an Aggregator. An aggregator's job is to periodically fetch new entries and store them on a database.
func NewInstagramAggregator ¶ added in v1.0.2
func NewInstagramAggregator(db *buntdb.DB, api instagram.InstagramAPI, imagesFolder string, client HTTPClient, logger zerolog.Logger) Aggregator
NewInstagramAggregator returns a new initialized instagram aggregator.
type HTTPClient ¶ added in v1.0.1
HTTPClient defines the primitive needed to perform HTTP queries
type InstagramAggregator ¶ added in v1.0.2
InstagramAggregator implements an aggregator that fetches Instagram posts.
- implements aggregator.Aggregator
func (*InstagramAggregator) Start ¶ added in v1.0.2
func (a *InstagramAggregator) Start(interval time.Duration) error
Start implements aggregator.Aggregator. It should be called only if the aggregator is not already running.
func (*InstagramAggregator) Stop ¶ added in v1.0.2
func (a *InstagramAggregator) Stop()
Stop implements aggregator.Aggregator. It should be called only if the Aggregator is started.
Click to show internal directories.
Click to hide internal directories.