mounts

package
v1.28.5 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 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.

The most recent repository this process read from or wrote to wins, an older one may still hold the layer but is the staler answer. A guess never displaces one of those, remote.Write fails a push when the token request for a mount source is refused and costs it a plain retry.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Mountable

func Mountable(repos []name.Repository, registry string) (int, 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 RecordGuess added in v1.28.4

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

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