gop2pt

package module
v0.0.0-...-9e09347 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2022 License: MIT Imports: 13 Imported by: 0

README

gop2pt

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultLogger

func DefaultLogger() *defaultLog

Types

type Option

type Option func(*P2PT)

func AnnounceInterval

func AnnounceInterval(announceInterval time.Duration) Option

func NumWant

func NumWant(numWant int) Option

func WithLogger

func WithLogger(logger dslog.Logger) Option

func WithProxy

func WithProxy(proxy ProxyFunc) Option

type P2PT

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

func New

func New(identifier string, announceURLs []string, opts ...Option) *P2PT

func (*P2PT) Start

func (p *P2PT) Start() (net.Listener, error)

type ProxyFunc

type ProxyFunc func(*http.Request) (*url.URL, error)

Directories

Path Synopsis
Package pproffd is for detecting resource leaks due to unclosed handles.
Package pproffd is for detecting resource leaks due to unclosed handles.

Jump to

Keyboard shortcuts

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