mounts

package
v1.28.3 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package mounts remembers which repositories hold a layer, so a push can have the destination registry mount a blob instead of taking the bytes.

remote.Write only offers a mount for layers still carrying the reference they were pulled from, which every local copy kaniko makes throws away. Keyed by digest rather than held on the layer, so a copy that keeps the bytes keeps the entry and one that rewrites them misses.

Only repositories this process read from or wrote to belong here. remote.Write fails a push outright when the token request for a mount source is refused, so an unproven entry is not a missed optimisation but a broken build.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Mountable

func Mountable(repos []name.Repository, registry string) (name.Repository, bool)

Mountable returns one of the repositories known to hold a layer that sits on registry. Cross-registry origins are not honoured in practice, so a source elsewhere is no source.

func MountableImage

func MountableImage(img v1.Image, registry string) v1.Image

func PlannedDigest

func PlannedDigest(cacheKey string) v1.Hash

PlannedDigest names a layer that does not exist yet by the cache key that decides where it will end up. Cache keys are sha256 hex like a digest, and never collide with one in practice.

func RecordImage

func RecordImage(img v1.Image, repo name.Repository)

func Snapshot

func Snapshot() map[v1.Hash][]name.Repository

Snapshot copies the map, not the slices in it. Those are shared and read-only: extend an entry by replacing it, never by appending into the one that is there.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL