Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DryRunPruner ¶
type DryRunPruner struct{}
DryRunPruner prints information about each object that going to remove.
func (*DryRunPruner) DeleteBlob ¶
func (*DryRunPruner) DeleteManifestLink ¶
func (p *DryRunPruner) DeleteManifestLink(ctx context.Context, svc distribution.ManifestService, reponame string, dgst digest.Digest) error
func (*DryRunPruner) DeleteRepository ¶
func (p *DryRunPruner) DeleteRepository(ctx context.Context, reponame string) error
type Pruner ¶
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 ¶
type RegistryPruner struct {
StorageDriver driver.StorageDriver
}
RegistryPruner deletes objects.
func (*RegistryPruner) DeleteBlob ¶
DeleteBlob removes a blob from the storage
func (*RegistryPruner) DeleteManifestLink ¶
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 ¶
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).