sources

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: EUPL-1.2 Imports: 10 Imported by: 0

Documentation

Overview

Package sources provides image download sources for go-container.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CDNSource

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

CDNSource downloads images from a CDN or S3 bucket.

func NewCDNSource

func NewCDNSource(cfg SourceConfig) *CDNSource

NewCDNSource creates a new CDN source.

func (*CDNSource) Available

func (s *CDNSource) Available() bool

Available checks if CDN URL is configured.

func (*CDNSource) Download

func (s *CDNSource) Download(ctx context.Context, m io.Medium, dest string, progress func(downloaded, total int64)) error

Download downloads the image from CDN.

func (*CDNSource) LatestVersion

func (s *CDNSource) LatestVersion(ctx context.Context) (string, error)

LatestVersion fetches version from manifest or returns "latest".