metainforequester

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	MaxConcurrency uint
	RequestTimeout time.Duration
}

func NewDefaultConfig

func NewDefaultConfig() Config

type Params

type Params struct {
	fx.In
	Config Config
}

type Requester

type Requester interface {
	Request(ctx context.Context, infoHash model.Hash20, node krpc.NodeAddr) (metainfo.Info, error)
}

type Result

type Result struct {
	fx.Out
	Requester Requester
}

func New

func New(p Params) Result

Jump to

Keyboard shortcuts

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