Documentation
¶
Index ¶
- Constants
- type Downloader
- func (d Downloader) CleanUp()
- func (d Downloader) Download() error
- func (d Downloader) GetBytesComplete() int64
- func (d Downloader) GetDownloadSize() int64
- func (d Downloader) GetFilePath() (string, error)
- func (d Downloader) IsComplete() bool
- func (d Downloader) IsEmpty() bool
- func (d Downloader) UnpackTo(targetDir string) error
- type Getter
Constants ¶
View Source
const (
// public archive
PChainArchiveTestnet = "https://luxd-public-shared-database.lux-test.network/testnet/p-chain/luxd/data-tar/latest.tar"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Downloader ¶
type Downloader struct {
// contains filtered or unexported fields
}
func NewDownloader ¶
NewDownloader returns a new Downloader network: the network to download from ( testnet only). target: the path to download to logLevel: the log level
func (Downloader) CleanUp ¶
func (d Downloader) CleanUp()
func (Downloader) Download ¶
func (d Downloader) Download() error
func (Downloader) GetBytesComplete ¶
func (d Downloader) GetBytesComplete() int64
GetCurrentProgress returns the current download progress
func (Downloader) GetDownloadSize ¶
func (d Downloader) GetDownloadSize() int64
GetDownloadSize returns the size of the download
func (Downloader) GetFilePath ¶
func (d Downloader) GetFilePath() (string, error)
func (Downloader) IsComplete ¶
func (d Downloader) IsComplete() bool
IsComplete returns true if the download is complete
func (Downloader) IsEmpty ¶
func (d Downloader) IsEmpty() bool
IsEmpty returns true if the Downloader is empty and not initialized
func (Downloader) UnpackTo ¶
func (d Downloader) UnpackTo(targetDir string) error
Click to show internal directories.
Click to hide internal directories.