backend

package
v0.0.0-...-29c78fd Latest Latest
Warning

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

Go to latest
Published: May 28, 2022 License: ISC Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Providers map[string]providers.Provider

Providers contains a list of all providers registered with the application

Functions

func AddMiddleware

func AddMiddleware(r *mux.Router)

func Start

func Start()

Types

type Poller

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

Poller holds the state for the poller, which polls the providers for new metas and comments

func NewPoller

func NewPoller() *Poller

NewPoller sets up the state and returns an instance of a Poller

func (*Poller) PollAllProviders

func (p *Poller) PollAllProviders() ([]*providers.Meta, []error)

PollAllProviders calls PollProvider on each of the providers in the Providers map. It returns a slice of pointers to Meta objects, as well as a slice of errors. This is so that if one provider returns an error, the entire call is not invalidated.

func (*Poller) PollProvider

func (p *Poller) PollProvider(provider providers.Provider) ([]*providers.Meta, error)

PollProviders polls the top-level metas off of a provider, and returns a slice of pointers to Meta objects, and an error.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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