Documentation ¶
Index ¶
- Variables
- type ADNL
- type DHT
- type RLDP
- type Resolver
- type Transport
- type VirtualStorage
- func (v *VirtualStorage) GetActiveFiles(bagId []byte) ([]uint32, error)
- func (v *VirtualStorage) GetAll() []*storage.Torrent
- func (v *VirtualStorage) GetFS() storage.FS
- func (v *VirtualStorage) GetPiece(bagId []byte, id uint32) (*storage.PieceInfo, error)
- func (v *VirtualStorage) GetTorrentByOverlay(overlay []byte) *storage.Torrent
- func (v *VirtualStorage) PiecesMask(bagId []byte, num uint32) []byte
- func (v *VirtualStorage) RemovePiece(bagId []byte, id uint32) error
- func (v *VirtualStorage) SetActiveFiles(bagId []byte, ids []uint32) error
- func (v *VirtualStorage) SetPiece(bagId []byte, id uint32, p *storage.PieceInfo) error
- func (v *VirtualStorage) SetTorrent(t *storage.Torrent) error
- func (v *VirtualStorage) UpdateUploadStats(bagId []byte, val uint64) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type ADNL ¶
type ADNL interface { RemoteAddr() string GetID() []byte Query(ctx context.Context, req, result tl.Serializable) error SetDisconnectHandler(handler func(addr string, key ed25519.PublicKey)) SetCustomMessageHandler(handler func(msg *adnl.MessageCustom) error) SendCustomMessage(ctx context.Context, req tl.Serializable) error Close() }
type RLDP ¶
type RLDP interface { Close() DoQuery(ctx context.Context, maxAnswerSize int64, query, result tl.Serializable) error SetOnQuery(handler func(transferId []byte, query *rldp.Query) error) SetOnDisconnect(handler func()) SendAnswer(ctx context.Context, maxAnswerSize int64, queryId, transferId []byte, answer tl.Serializable) error }
type Transport ¶
type Transport struct {
// contains filtered or unexported fields
}
func NewTransport ¶
func NewTransport(dht DHT, resolver Resolver, storeConn storage.NetConnector, store *VirtualStorage) *Transport
type VirtualStorage ¶
type VirtualStorage struct {
// contains filtered or unexported fields
}
func NewVirtualStorage ¶
func NewVirtualStorage() *VirtualStorage
func (*VirtualStorage) GetActiveFiles ¶
func (v *VirtualStorage) GetActiveFiles(bagId []byte) ([]uint32, error)
func (*VirtualStorage) GetAll ¶
func (v *VirtualStorage) GetAll() []*storage.Torrent
func (*VirtualStorage) GetFS ¶
func (v *VirtualStorage) GetFS() storage.FS
func (*VirtualStorage) GetTorrentByOverlay ¶
func (v *VirtualStorage) GetTorrentByOverlay(overlay []byte) *storage.Torrent
func (*VirtualStorage) PiecesMask ¶
func (v *VirtualStorage) PiecesMask(bagId []byte, num uint32) []byte
func (*VirtualStorage) RemovePiece ¶
func (v *VirtualStorage) RemovePiece(bagId []byte, id uint32) error
func (*VirtualStorage) SetActiveFiles ¶
func (v *VirtualStorage) SetActiveFiles(bagId []byte, ids []uint32) error
func (*VirtualStorage) SetTorrent ¶
func (v *VirtualStorage) SetTorrent(t *storage.Torrent) error
func (*VirtualStorage) UpdateUploadStats ¶ added in v1.5.0
func (v *VirtualStorage) UpdateUploadStats(bagId []byte, val uint64) error
Click to show internal directories.
Click to hide internal directories.