cdn

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package cdn provides functionality for downloading Path of Exile game bundles from CDN servers. It handles URL construction, index file downloads, and bundle downloads with progress tracking for both single and multiple bundle operations.

Index

Constants

View Source
const (
	// CDN base URLs for different game versions
	PoE1CDNURL = "https://patch.poecdn.com"
	PoE2CDNURL = "https://patch-poe2.poecdn.com"

	// Default download configuration
	DefaultRetries = 3
	DefaultTimeout = 30 // seconds
)

Constants for CDN operations

Variables

This section is empty.

Functions

func ConstructURL

func ConstructURL(gameVersion int, patch string, filename string) string

ConstructURL builds the CDN URL based on game version and patch. Game versions >= 4 use the PoE2 CDN, while older versions use PoE1 CDN.

func DownloadBundle

func DownloadBundle(cache *cache.Cache, patch string, gameVersion int, bundleName string, force bool) error

DownloadBundle downloads a single bundle. This function handles the download of both regular bundles and the special index bundle.

func DownloadBundles

func DownloadBundles(cache *cache.Cache, patch string, gameVersion int, bundleNames []string, force bool) error

DownloadBundles downloads a list of bundles from the CDN.

func DownloadIndex

func DownloadIndex(cache *cache.Cache, patch string, gameVersion int, force bool) error

DownloadIndex downloads the _.index.bin file from CDN with progress tracking. The index file contains metadata about all available bundles for a patch version.

Types

This section is empty.

Jump to

Keyboard shortcuts

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