Documentation
¶
Index ¶
- Variables
- type AddUpdate
- type Client
- type DHT
- type FECInfoNone
- type FileInfo
- type GetPiece
- type GetTorrentInfo
- type Ok
- type Piece
- type Ping
- type Pong
- type State
- type TorrentDownloader
- type TorrentHeader
- type TorrentInfo
- type TorrentInfoContainer
- type UpdateHavePieces
- type UpdateInit
- type UpdateState
Constants ¶
This section is empty.
Variables ¶
View Source
var Logger = func(a ...any) {}
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CreateDownloader ¶
type DHT ¶
type DHT interface {
StoreAddress(ctx context.Context, addresses address.List, ttl time.Duration, ownerKey ed25519.PrivateKey, copies int) (int, []byte, error)
FindAddresses(ctx context.Context, key []byte) (*address.List, ed25519.PublicKey, error)
FindOverlayNodes(ctx context.Context, overlayId []byte, continuation ...*dht.Continuation) (*overlay.NodesList, *dht.Continuation, error)
Close()
}
type FECInfoNone ¶
type FECInfoNone struct{}
type GetTorrentInfo ¶
type GetTorrentInfo struct{}
type TorrentDownloader ¶
type TorrentHeader ¶
type TorrentHeader struct {
FilesCount uint32
TotalNameSize uint64
TotalDataSize uint64
FEC FECInfoNone
DirNameSize uint32
DirName []byte
NameIndex []uint64
DataIndex []uint64
Names []byte
Data []byte
}
func (*TorrentHeader) Serialize ¶
func (t *TorrentHeader) Serialize() ([]byte, error)
type TorrentInfo ¶
type TorrentInfoContainer ¶
type TorrentInfoContainer struct {
Data []byte `tl:"bytes"`
}
type UpdateHavePieces ¶
type UpdateHavePieces struct {
PieceIDs []int32 `tl:"vector int"`
}
type UpdateInit ¶
type UpdateState ¶
type UpdateState struct {
State State `tl:"struct boxed"`
}
Click to show internal directories.
Click to hide internal directories.