Documentation
¶
Index ¶
- Constants
- func Import(ctx context.Context, opts Options) error
- type CompositeSource
- func (c *CompositeSource) Close() error
- func (c *CompositeSource) GetBlob(ctx context.Context, info types.BlobInfo, cache types.BlobInfoCache) (io.ReadCloser, int64, error)
- func (c *CompositeSource) GetManifest(ctx context.Context, instanceDigest *digest.Digest) ([]byte, string, error)
- func (c *CompositeSource) GetSignatures(ctx context.Context, instanceDigest *digest.Digest) ([][]byte, error)
- func (c *CompositeSource) HasThreadSafeGetBlob() bool
- func (c *CompositeSource) LayerInfosForCopy(ctx context.Context, instanceDigest *digest.Digest) ([]types.BlobInfo, error)
- func (c *CompositeSource) Reference() types.ImageReference
- type DryRunReport
- type Options
Constants ¶
const ( FormatDockerArchive = "docker-archive" FormatOCIArchive = "oci-archive" FormatDir = "dir" )
Output format identifiers accepted by Options.OutputFormat.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CompositeSource ¶
type CompositeSource struct {
// contains filtered or unexported fields
}
CompositeSource implements types.ImageSource by overlaying a delta source on top of a baseline source. GetManifest comes from the delta (the authoritative holder of the target manifest). GetBlob prefers the delta and falls back to baseline when the delta returns a not-found error.
func NewCompositeSource ¶
func NewCompositeSource(delta, baseline types.ImageSource) *CompositeSource
NewCompositeSource wraps the two inner sources. Close() on the composite calls Close on both; the caller must not close the inner sources directly.
func (*CompositeSource) Close ¶
func (c *CompositeSource) Close() error
func (*CompositeSource) GetBlob ¶
func (c *CompositeSource) GetBlob( ctx context.Context, info types.BlobInfo, cache types.BlobInfoCache, ) (io.ReadCloser, int64, error)
GetBlob serves delta blobs first, then baseline. Any error from the delta that is not "not found" propagates verbatim.
func (*CompositeSource) GetManifest ¶
func (c *CompositeSource) GetManifest(ctx context.Context, instanceDigest *digest.Digest) ([]byte, string, error)
GetManifest delegates to the delta (the authoritative holder of the target manifest in the import pipeline).
func (*CompositeSource) GetSignatures ¶
func (*CompositeSource) HasThreadSafeGetBlob ¶
func (c *CompositeSource) HasThreadSafeGetBlob() bool
func (*CompositeSource) LayerInfosForCopy ¶
func (*CompositeSource) Reference ¶
func (c *CompositeSource) Reference() types.ImageReference
type DryRunReport ¶
type DryRunReport struct {
AllReachable bool
MissingDigests []string
RequiredBlobs int
BaselineSource string
}
DryRunReport summarizes a dry-run import: which required baseline blobs are reachable and which (if any) are missing.
func DryRun ¶
func DryRun(ctx context.Context, opts Options) (DryRunReport, error)
DryRun performs steps 1-4 of the import pipeline (extract, parse, open baseline, probe) without calling copy.Image or writing any output files. Returns a report describing whether every required baseline blob is reachable from the provided baseline reference.