sources

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2023 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Sources = []Source{}

Functions

This section is empty.

Types

type Feed

type Feed func(ctx context.Context, h *http.Client) Src

type Signal added in v0.3.0

type Signal struct {
	Proxy pmux.Proxy
	Add   bool
	Err   error
}

type Source

type Source struct {
	ID int

	Frequency time.Duration

	// Seed sources use http.DefaultClient to retrieve data,
	// all other sources use proxy pool to fetch pages.
	Seed bool

	Session   bool
	Homepage  string
	UrlPrefix string

	Feed func(context.Context, *http.Client) Src
	// contains filtered or unexported fields
}

func ByID

func ByID(id int) Source

func ByName

func ByName(name string) Source

func (Source) Name

func (s Source) Name() string

type Src

type Src interface {
	Generate(ctx context.Context) <-chan Signal
	Err() error
	Len() int
}

Jump to

Keyboard shortcuts

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