syncer

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Syncer

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

Syncer periodically fetches the latest blocklist additions from a configured set of portals, adding them the local blocklist database.

func New

func New(db *database.DB, portalURLs []string, logger *logrus.Logger) (*Syncer, error)

New returns a new Syncer with the given parameters.

func (*Syncer) Start

func (s *Syncer) Start() error

Start launches a background task that periodically syncs the blocklists of the preconfigured portals with the blocklist of the local skyd instance.

func (*Syncer) Stop

func (s *Syncer) Stop() error

Stop waits for the syncer's waitgroup and times out after one minute.

Jump to

Keyboard shortcuts

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