Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DownloadCallback ¶
type Downloader ¶
type Downloader struct { Client *drive.Client BufferSize int64 // contains filtered or unexported fields }
Downloader handles concurrent chunk downloads
func NewDownloader ¶
func NewDownloader(threads int, client *drive.Client, storage *Storage, bufferSize int64) (*Downloader, error)
NewDownloader creates a new download manager
func (*Downloader) Download ¶
func (d *Downloader) Download(req *Request, callback DownloadCallback)
Download starts a new download request
type Manager ¶
Manager manages chunks on disk
type QueueEntry ¶
type QueueEntry struct {
// contains filtered or unexported fields
}
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
Request represents a chunk request
type Stack ¶
type Stack struct {
// contains filtered or unexported fields
}
Stack is a thread safe list/stack implementation
type Storage ¶
type Storage struct { ChunkFile *os.File ChunkSize int64 HeaderSize int64 MaxChunks int // contains filtered or unexported fields }
Storage is a chunk storage
func NewStorage ¶
func NewStorage(chunkSize int64, maxChunks int, maxMmapSize int64, chunkFilePath string) (*Storage, error)
NewStorage creates a new storage
Click to show internal directories.
Click to hide internal directories.