Documentation
¶
Index ¶
- Constants
- func MediaTypeForPath(path string) string
- func PublishedUbuntuReference(ubuntuType, arch string) string
- type ArtifactFile
- type ForeignArtifact
- type ForeignArtifactConfirmation
- type PullOptions
- type PushOptions
- type RegistryOptions
- type TransferProgress
- type TransferResult
- type TransferStatus
Constants ¶
const ( ArtifactType = "application/vnd.dev-alchemy.vm-build.v1" MediaTypeArtifact = "application/vnd.dev-alchemy.vm-build.artifact.v1" MediaTypeQCOW2 = "application/vnd.dev-alchemy.vm-build.qcow2.v1" MediaTypeVagrantBox = "application/vnd.dev-alchemy.vm-build.vagrant-box.v1" AnnotationVMOS = "dev.alchemy.vm.os" AnnotationVMType = "dev.alchemy.vm.type" AnnotationVMArch = "dev.alchemy.vm.arch" AnnotationVMHostOS = "dev.alchemy.vm.host_os" AnnotationVMVirtualizationEngine = "dev.alchemy.vm.virtualization_engine" AnnotationVMSlug = "dev.alchemy.vm.slug" )
const PublishedUbuntuRepository = "ghcr.io/csautter/ubuntu-24"
PublishedUbuntuRepository holds the Ubuntu artifacts the Linux build workflow publishes from main (see ADR 0003). Released CLIs resolve references below it, so changing the repository or tag shape breaks them.
Variables ¶
This section is empty.
Functions ¶
func MediaTypeForPath ¶
func PublishedUbuntuReference ¶ added in v0.22.0
PublishedUbuntuReference returns the published reference for an Ubuntu type and architecture.
Types ¶
type ArtifactFile ¶
func ArtifactFiles ¶
func ArtifactFiles(vm alchemy_build.VirtualMachineConfig) ([]ArtifactFile, error)
type ForeignArtifact ¶
type ForeignArtifact struct {
OS string
UbuntuType string
Arch string
SourceHostOS alchemy_build.HostOsType
SourceVirtualizationEngine alchemy_build.VirtualizationEngine
TargetHostOS alchemy_build.HostOsType
TargetVirtualizationEngine alchemy_build.VirtualizationEngine
SourceHostOSAnnotation string
SourceVirtualizationAnnotation string
}
type ForeignArtifactConfirmation ¶
type ForeignArtifactConfirmation func(context.Context, ForeignArtifact) (bool, error)
ForeignArtifactConfirmation decides whether a compatible artifact built for a different host OS may be pulled into the requested local artifact slot.
type PullOptions ¶
type PullOptions struct {
RegistryOptions
Progress TransferProgress
ConfirmForeignArtifactUse ForeignArtifactConfirmation
}
type PushOptions ¶
type PushOptions struct {
RegistryOptions
Progress TransferProgress
}
type RegistryOptions ¶
type TransferProgress ¶
TransferProgress receives aggregate byte progress for OCI push and pull operations. Implementations must be safe for concurrent Add calls.
type TransferResult ¶
type TransferResult struct {
Reference string
Digest string
MediaType string
Size int64
Artifacts []ArtifactFile
}
func Pull ¶
func Pull(ctx context.Context, vm alchemy_build.VirtualMachineConfig, reference string, opts PullOptions) (TransferResult, error)
func Push ¶
func Push(ctx context.Context, vm alchemy_build.VirtualMachineConfig, reference string, opts PushOptions) (TransferResult, error)
type TransferStatus ¶
type TransferStatus interface {
Status(message string)
}
TransferStatus receives human-readable phase updates for work that happens before or after the byte transfer itself.