mirrors

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildHTTPSURL added in v0.7.0

func BuildHTTPSURL(url string) string

BuildHTTPSURL constructs an HTTPS URL.

func BuildHTTPURL added in v0.7.0

func BuildHTTPURL(url string) string

BuildHTTPURL constructs an HTTP URL.

func BuildListenAddress added in v0.7.0

func BuildListenAddress(host, port string) string

BuildListenAddress constructs a listen address (host:port).

func GetFullMirrorURL

func GetFullMirrorURL(mirror distro.URLWithAlias) string

func GetGeoMirrorUrlsByMode

func GetGeoMirrorUrlsByMode(mode int) (mirrors []string)

func GetMirrorURLByAliases

func GetMirrorURLByAliases(osType int, alias string) string

func GetPredefinedConfiguration

func GetPredefinedConfiguration(proxyMode int) (string, *regexp.Regexp)

func GetUbuntuMirrorUrlsByGeo

func GetUbuntuMirrorUrlsByGeo() (mirrors []string, err error)

GetUbuntuMirrorUrlsByGeo fetches the geo-localized mirrors list using a background context with a fixed timeout. Prefer GetUbuntuMirrorUrlsByGeoCtx when a caller-provided context is available (e.g. inside benchmark flow).

func GetUbuntuMirrorUrlsByGeoCtx added in v0.10.0

func GetUbuntuMirrorUrlsByGeoCtx(ctx context.Context) (mirrors []string, err error)

GetUbuntuMirrorUrlsByGeoCtx fetches Ubuntu's mirror list honoring the caller-provided context for cancellation/deadline.

Types

type ListenAddressTemplateData added in v0.7.0

type ListenAddressTemplateData struct {
	Host string
	Port string
}

ListenAddressTemplateData holds data for listen address building (kept for API compatibility).

type URLTemplateData added in v0.7.0

type URLTemplateData struct {
	URL string
}

URLTemplateData holds data for URL building (kept for API compatibility).

Jump to

Keyboard shortcuts

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