storage

package
v0.0.0-...-ed82f56 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const NsqChannel = "channel"
View Source
const NsqServer = "localhost:4150"
View Source
const NsqTopic = "scraper_"

Variables

This section is empty.

Functions

func WriteLinksToFile

func WriteLinksToFile(links map[string]struct{}, filename string) error

func WriteLinksToFileRandomFilename

func WriteLinksToFileRandomFilename(links map[string]struct{}, baseDir string) error

Types

type NSQDServer

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

func NewNSQDServer

func NewNSQDServer() (*NSQDServer, error)

func (*NSQDServer) Error

func (s *NSQDServer) Error() <-chan error

func (*NSQDServer) Stop

func (s *NSQDServer) Stop()

type Queue

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

func NewQueue

func NewQueue(path string, workerCount int) (*Queue, error)

func (*Queue) AddURL

func (store *Queue) AddURL(targetURL string) error

TODO: Canonicalize links before everything

func (*Queue) CloseDB

func (store *Queue) CloseDB() error

func (*Queue) IsStopped

func (store *Queue) IsStopped() bool

func (*Queue) StopProducer

func (store *Queue) StopProducer()

func (*Queue) StopSignal

func (store *Queue) StopSignal()

Jump to

Keyboard shortcuts

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