tordht

package
v0.0.0-...-1404cd9 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DHT

type DHT interface {
	io.Closer

	PeerInfo() *PeerInfo
	Provide(ctx context.Context, id []byte) error
	FindProviders(ctx context.Context, id []byte, maxCount int) ([]*PeerInfo, error)
}

type DHTConf

type DHTConf struct {
	Tor            *tor.Tor
	BootstrapPeers []*PeerInfo
	ClientOnly     bool
	Verbose        bool
}

type Impl

type Impl interface {
	ApplyDebugLogging()
	RawStringDataID(id []byte) (string, error)
	NewDHT(ctx context.Context, conf *DHTConf) (DHT, error)
}

type PeerInfo

type PeerInfo struct {
	ID string
	// May be empty string if not listening
	OnionServiceID string
	// Invalid value if OnionServiceID is empty
	OnionPort int
}

func NewPeerInfo

func NewPeerInfo(str string) (*PeerInfo, error)

func (*PeerInfo) String

func (p *PeerInfo) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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