poller

package
v0.0.0-...-202a999 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2020 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Poller

type Poller struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Poller represents a poller instance.

func New

func New(
	ctx context.Context,
	storage *storage.Storage,
	searcher *catalog.Searcher,
	config *config.Config,
	logger *logger.Logger,
) *Poller

New creates a new poller instance.

func (*Poller) Refresh

func (p *Poller) Refresh(prov storage.Provider)

Refresh triggers a refresh on an existing poller worker.

func (*Poller) RefreshAll

func (p *Poller) RefreshAll()

RefreshAll triggers a refresh on all the registered poller workers.

func (*Poller) Run

func (p *Poller) Run() error

Run starts polling the providers.

func (*Poller) Shutdown

func (p *Poller) Shutdown()

Shutdown stops the providers polling.

func (*Poller) StartWorker

func (p *Poller) StartWorker(prov *storage.Provider)

StartWorker starts a new poller worker given a storage provider.

func (*Poller) StopWorker

func (p *Poller) StopWorker(prov *storage.Provider, update bool)

StopWorker stops an existing poller worker.

func (*Poller) WorkerError

func (p *Poller) WorkerError(id string) error

WorkerError returns the error returned on poller worker initialization.

Jump to

Keyboard shortcuts

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