Documentation ¶
Overview ¶
Package stream models a CoreOS "stream", which is a description of the recommended set of binary images for CoreOS. Use this API to find cloud images, bare metal disk images, etc.
Index ¶
- type Arch
- type Artifact
- type AwsImage
- type AwsRegionImage
- type GcpImage
- type ImageFormat
- type Images
- type Metadata
- type PlatformArtifacts
- type RegionImage
- type RegionObject
- type ReplicatedImage
- type ReplicatedObject
- type SingleImage
- type SingleObject
- type Stream
- func (st *Stream) FormatPrefix(archname string) string
- func (st *Stream) GetAMI(archname, region string) (string, error)
- func (st *Stream) GetAliyunImage(archname, region string) (string, error)
- func (st *Stream) GetAliyunRegionImage(archname, region string) (*SingleImage, error)
- func (st *Stream) GetArchitecture(archname string) (*Arch, error)
- func (st *Stream) GetAwsRegionImage(archname, region string) (*SingleImage, error)
- func (st *Stream) QueryDisk(architectureName, artifactName, formatName string) (*Artifact, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Arch ¶
type Arch struct { Artifacts map[string]PlatformArtifacts `json:"artifacts"` Images Images `json:"images,omitempty"` // RHELCoreOSExtensions is data specific to Red Hat Enterprise Linux CoreOS RHELCoreOSExtensions *rhcos.Extensions `json:"rhel-coreos-extensions,omitempty"` }
Arch contains release details for a particular hardware architecture
type Artifact ¶
type Artifact struct { Location string `json:"location"` Signature string `json:"signature,omitempty"` Sha256 string `json:"sha256"` UncompressedSha256 string `json:"uncompressed-sha256,omitempty"` }
Artifact represents one image file, plus its metadata
func (*Artifact) Download ¶
/ Download fetches the specified artifact and saves it to the target / directory. The full file path will be returned as a string. / If the target file path exists, it will be overwritten. / If the download fails, the temporary file will be deleted.
type AwsRegionImage ¶
type AwsRegionImage = SingleImage
AwsRegionImage is a typedef for backwards compatibility.
type GcpImage ¶
type GcpImage struct { Release string `json:"release"` Project string `json:"project"` Family string `json:"family,omitempty"` Name string `json:"name"` }
GcpImage represents a GCP cloud image
type ImageFormat ¶
type ImageFormat struct { Disk *Artifact `json:"disk,omitempty"` Kernel *Artifact `json:"kernel,omitempty"` Initramfs *Artifact `json:"initramfs,omitempty"` Rootfs *Artifact `json:"rootfs,omitempty"` }
ImageFormat contains all artifacts for a single OS image
type Images ¶
type Images struct { Aliyun *ReplicatedImage `json:"aliyun,omitempty"` Aws *AwsImage `json:"aws,omitempty"` Gcp *GcpImage `json:"gcp,omitempty"` Ibmcloud *ReplicatedObject `json:"ibmcloud,omitempty"` KubeVirt *SingleImage `json:"kubevirt,omitempty"` PowerVS *ReplicatedObject `json:"powervs,omitempty"` }
Images contains images available in cloud providers
type Metadata ¶
type Metadata struct { LastModified string `json:"last-modified"` Generator string `json:"generator,omitempty"` }
Metadata for a release or stream
type PlatformArtifacts ¶
type PlatformArtifacts struct { Release string `json:"release"` Formats map[string]ImageFormat `json:"formats"` }
PlatformArtifacts contains images for a platform
type RegionImage ¶ added in v0.1.2
type RegionImage = SingleImage
RegionImage is a typedef for backwards compatibility.
type RegionObject ¶ added in v0.1.5
type RegionObject = SingleObject
RegionObject is a typedef for backwards compatibility.
type ReplicatedImage ¶ added in v0.1.2
type ReplicatedImage struct {
Regions map[string]SingleImage `json:"regions,omitempty"`
}
ReplicatedImage represents an image in all regions of an AWS-like cloud
type ReplicatedObject ¶ added in v0.1.5
type ReplicatedObject struct {
Regions map[string]SingleObject `json:"regions,omitempty"`
}
ReplicatedObject represents an object in all regions of an IBMCloud-like cloud
type SingleImage ¶ added in v0.2.0
SingleImage represents a globally-accessible image or an image in a single region of an AWS-like cloud
type SingleObject ¶ added in v0.2.0
type SingleObject struct { Release string `json:"release"` Object string `json:"object"` Bucket string `json:"bucket"` Url string `json:"url"` }
SingleObject represents a globally-accessible cloud storage object, or an object in a single region of an IBMCloud-like cloud
type Stream ¶
type Stream struct { Stream string `json:"stream"` Metadata Metadata `json:"metadata"` Architectures map[string]Arch `json:"architectures"` }
Stream contains artifacts available in a stream
func (*Stream) FormatPrefix ¶
FormatPrefix describes a stream+architecture combination, intended for prepending to error messages
func (*Stream) GetAMI ¶
GetAMI returns the AWS machine image for a particular architecture and region.
func (*Stream) GetAliyunImage ¶ added in v0.1.2
GetAliyunImage returns the Aliyun image for a particular architecture and region.
func (*Stream) GetAliyunRegionImage ¶ added in v0.1.2
func (st *Stream) GetAliyunRegionImage(archname, region string) (*SingleImage, error)
GetAliyunRegionImage returns the release data (Image ID and release ID) for a particular architecture and region.
func (*Stream) GetArchitecture ¶
GetArchitecture loads the architecture-specific builds from a stream, with a useful descriptive error message if the architecture is not found.
func (*Stream) GetAwsRegionImage ¶
func (st *Stream) GetAwsRegionImage(archname, region string) (*SingleImage, error)
GetAwsRegionImage returns the release data (AMI and release ID) for a particular architecture and region.