manifests

package
v0.6.73 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: AGPL-3.0, Apache-2.0, MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetReader

func GetReader(url, token string) (io.ReadCloser, http.Header, error)

GetReader fetches url, retrying rate limited requests with exponential backoff that honors Retry-After.

func IsDirEmpty

func IsDirEmpty(path string) (bool, error)

func Untar

func Untar(dst string, r io.Reader) (err error)

Types

type BackoffError added in v0.6.73

type BackoffError struct {
	Remaining time.Duration
}

BackoffError is returned without contacting the console while a previous rate limit is still being backed off.

func (*BackoffError) Error added in v0.6.73

func (e *BackoffError) Error() string

type HTTPError

type HTTPError struct {
	StatusCode int
	URL        string
	Msg        string
	// RetryAfter is the delay requested by the server's Retry-After header, zero if it sent none.
	RetryAfter time.Duration
}

func (*HTTPError) Error

func (e *HTTPError) Error() string

type ManifestCache

type ManifestCache struct {
	// contains filtered or unexported fields
}

func NewCache

func NewCache(expiry time.Duration, token, consoleURL, cacheDir string) *ManifestCache

func (*ManifestCache) Expire

func (c *ManifestCache) Expire(id string)

func (*ManifestCache) ExpiryWithJitter

func (c *ManifestCache) ExpiryWithJitter() time.Duration

func (*ManifestCache) Export added in v0.6.59

func (c *ManifestCache) Export() map[string]persist.ManifestRecord

func (*ManifestCache) Fetch

func (*ManifestCache) Import added in v0.6.59

func (c *ManifestCache) Import(items map[string]persist.ManifestRecord)

func (*ManifestCache) Wipe

func (c *ManifestCache) Wipe()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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