Documentation ¶
Overview ¶
Package oci provides a way to interact with Datadog Packages OCIs.
Index ¶
Constants ¶
View Source
const ( // RegistryAuthDefault is the default registry authentication method. Under the hood, it uses the Docker configuration. RegistryAuthDefault string = "docker" // RegistryAuthGCR is the Google Container Registry authentication method. RegistryAuthGCR string = "gcr" // RegistryAuthECR is the Amazon Elastic Container Registry authentication method. RegistryAuthECR string = "ecr" // RegistryAuthPassword is the password registry authentication method. RegistryAuthPassword string = "password" )
View Source
const ( // AnnotationPackage is the annotiation used to identify the package name. AnnotationPackage = "com.datadoghq.package.name" // AnnotationVersion is the annotiation used to identify the package version. AnnotationVersion = "com.datadoghq.package.version" // AnnotationSize is the annotiation used to identify the package size. AnnotationSize = "com.datadoghq.package.size" // DatadogPackageLayerMediaType is the media type for the main Datadog Package layer. DatadogPackageLayerMediaType types.MediaType = "application/vnd.datadog.package.layer.v1.tar+zstd" // DatadogPackageConfigLayerMediaType is the media type for the optional Datadog Package config layer. DatadogPackageConfigLayerMediaType types.MediaType = "application/vnd.datadog.package.config.layer.v1.tar+zstd" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DownloadedPackage ¶
DownloadedPackage is the downloaded package.
func (*DownloadedPackage) ExtractLayers ¶
func (d *DownloadedPackage) ExtractLayers(mediaType types.MediaType, dir string) error
ExtractLayers extracts the layers of the downloaded package with the given media type to the given directory.
func (*DownloadedPackage) WriteOCILayout ¶
func (d *DownloadedPackage) WriteOCILayout(dir string) error
WriteOCILayout writes the image as an OCI layout to the given directory.
type Downloader ¶
type Downloader struct {
// contains filtered or unexported fields
}
Downloader is the Downloader used by the installer to download packages.
func NewDownloader ¶
func NewDownloader(env *env.Env, client *http.Client) *Downloader
NewDownloader returns a new Downloader.
func (*Downloader) Download ¶
func (d *Downloader) Download(ctx context.Context, packageURL string) (*DownloadedPackage, error)
Download downloads the Datadog Package referenced in the given Package struct.
Click to show internal directories.
Click to hide internal directories.