Documentation
¶
Index ¶
- type Character
- type CharacterScraper
- type Logger
- type LoggerQueueCfg
- type Scraper
- func (s *Scraper) AttachCharacterCollector(cb func(character Character)) CharacterScraper
- func (s *Scraper) AttachLogger(logger Logger)
- func (s *Scraper) AttachQueue(threads int, maxSize int) error
- func (s Scraper) Close()
- func (s Scraper) Restart(delay time.Duration) error
- func (s Scraper) SetLimiter(duration time.Duration, parallel int) error
- func (s Scraper) StartQueue() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CharacterScraper ¶
type CharacterScraper struct {
// contains filtered or unexported fields
}
func (CharacterScraper) AddCharacterToQueue ¶
func (s CharacterScraper) AddCharacterToQueue(region string, id int) error
AddCharacterToQueue adds a character to the queue
type Logger ¶
type Logger struct { DisableAll bool Queue LoggerQueueCfg }
type LoggerQueueCfg ¶
type Scraper ¶
type Scraper struct {
// contains filtered or unexported fields
}
func (*Scraper) AttachCharacterCollector ¶
func (s *Scraper) AttachCharacterCollector(cb func(character Character)) CharacterScraper
AttachCharacterCollector attaches a character collector to the scraper
func (*Scraper) AttachLogger ¶
AttachLogger attaches a logger to the scraper
func (*Scraper) AttachQueue ¶
SetupQueue sets up the queue for the scraper
func (Scraper) SetLimiter ¶
SetLimiter sets the rate limiter for the scraper
func (Scraper) StartQueue ¶
StartQueue initiates scraping with the queue
Click to show internal directories.
Click to hide internal directories.