Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DryRunPruner ¶ added in v3.7.0
type DryRunPruner struct{}
DryRunPruner prints information about each object that going to remove.
func (*DryRunPruner) DeleteBlob ¶ added in v3.7.0
func (*DryRunPruner) DeleteManifestLink ¶ added in v3.7.0
func (p *DryRunPruner) DeleteManifestLink(ctx context.Context, svc distribution.ManifestService, reponame string, dgst digest.Digest) error
func (*DryRunPruner) DeleteRepository ¶ added in v3.7.0
func (p *DryRunPruner) DeleteRepository(ctx context.Context, reponame string) error
type Pruner ¶ added in v3.7.0
type Pruner interface { DeleteRepository(ctx context.Context, reponame string) error DeleteManifestLink(ctx context.Context, svc distribution.ManifestService, reponame string, dgst digest.Digest) error DeleteBlob(ctx context.Context, dgst digest.Digest) error }
Pruner defines a common set of operations for pruning
type RegistryPruner ¶ added in v3.7.0
type RegistryPruner struct {
StorageDriver driver.StorageDriver
}
RegistryPruner deletes objects.
func (*RegistryPruner) DeleteBlob ¶ added in v3.7.0
DeleteBlob removes a blob from the storage
func (*RegistryPruner) DeleteManifestLink ¶ added in v3.7.0
func (p *RegistryPruner) DeleteManifestLink(ctx context.Context, svc distribution.ManifestService, reponame string, dgst digest.Digest) error
DeleteManifestLink removes a manifest link from the storage
func (*RegistryPruner) DeleteRepository ¶ added in v3.7.0
func (p *RegistryPruner) DeleteRepository(ctx context.Context, reponame string) error
DeleteRepository removes a repository directory from the storage
type Summary ¶
Summary is cumulative information about what was pruned.
func Prune ¶
func Prune(ctx context.Context, registry distribution.Namespace, registryClient client.RegistryClient, pruner Pruner) (Summary, error)
Prune removes blobs which are not used by Images in OpenShift.
On error, the Summary will contain what was deleted so far.
TODO(dmage): remove layer links to a blob if the blob is removed or it doesn't belong to the ImageStream. TODO(dmage): keep young blobs (docker/distribution#2297).