Add WithoutRefreshed metadata

Closes #2566

This provides faster lookups and lists for ctr commands.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2019-05-10 14:32:15 +00:00
parent bd27bef4ad
commit 67b45aef49
3 changed files with 39 additions and 9 deletions

View File

@@ -124,7 +124,7 @@ var listCommand = cli.Command{
w := tabwriter.NewWriter(os.Stdout, 4, 8, 4, ' ', 0)
fmt.Fprintln(w, "CONTAINER\tIMAGE\tRUNTIME\t")
for _, c := range containers {
info, err := c.Info(ctx)
info, err := c.Info(ctx, containerd.WithoutRefreshedMetadata)
if err != nil {
return err
}
@@ -261,7 +261,7 @@ var infoCommand = cli.Command{
if err != nil {
return err
}
info, err := container.Info(ctx)
info, err := container.Info(ctx, containerd.WithoutRefreshedMetadata)
if err != nil {
return err
}