kremlin

package
v0.0.0-...-c7f97ed Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Indexer

type Indexer struct {
	Link        link.Link
	Delay       time.Duration
	RandomDelay time.Duration
	Meta        *Meta
}

func NewIndexer

func NewIndexer(url link.Link, delay time.Duration, randomDelay time.Duration) *Indexer

NewIndexer creates a new Indexer with the given URL, delay, and randomDelay.

func (*Indexer) Run

func (i *Indexer) Run(ch chan feed.Entry, fp *gofeed.Parser, wg *sync.WaitGroup)

type Meta

type Meta struct {
	Updated *time.Time `json:"updated"`
	ID      string     `json:"id"`
	Self    string     `json:"self"`
	Prev    string     `json:"prev"`
	First   string     `json:"first"`
	Next    string     `json:"next"`
	Last    string     `json:"last"`
}

func NewMeta

func NewMeta() *Meta

NewMeta инициализирует и возвращает новый объект Meta.

Он не принимает параметров и возвращает указатель на объект Meta. Это объект, который содержит навигационную информацию о страницах ленты. Время последнего обновления страницы ленты. Адрес текущей страницы, адрес следующей станицы, адрес предыдущей и адрес последней и первой страницы в ленте. С помощью этой информации можно совершать обход ленты.

Jump to

Keyboard shortcuts

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