forked from TrueCloudLab/distribution
Update the gc documentation.
Signed-off-by: Richard Scothern <richard.scothern@gmail.com>
This commit is contained in:
parent
31ece3d3b6
commit
3d4b652b58
1 changed files with 3 additions and 4 deletions
|
@ -19,8 +19,7 @@ import (
|
||||||
|
|
||||||
func emit(format string, a ...interface{}) {
|
func emit(format string, a ...interface{}) {
|
||||||
if dryRun {
|
if dryRun {
|
||||||
fmt.Printf(format, a...)
|
fmt.Printf(format+"\n", a...)
|
||||||
fmt.Println("")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,8 +121,8 @@ func markAndSweep(ctx context.Context, storageDriver driver.StorageDriver, regis
|
||||||
// Construct vacuum
|
// Construct vacuum
|
||||||
vacuum := storage.NewVacuum(ctx, storageDriver)
|
vacuum := storage.NewVacuum(ctx, storageDriver)
|
||||||
for dgst := range deleteSet {
|
for dgst := range deleteSet {
|
||||||
|
emit("blob eligible for deletion: %s", dgst)
|
||||||
if dryRun {
|
if dryRun {
|
||||||
emit("deleting %s", dgst)
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
err = vacuum.RemoveBlob(string(dgst))
|
err = vacuum.RemoveBlob(string(dgst))
|
||||||
|
@ -169,7 +168,7 @@ var GCCmd = &cobra.Command{
|
||||||
|
|
||||||
k, err := libtrust.GenerateECP256PrivateKey()
|
k, err := libtrust.GenerateECP256PrivateKey()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintf(os.Stderr, "%s", err)
|
fmt.Fprint(os.Stderr, err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue