github.com/quay/claircore@v1.5.28/indexer/controller/scanlayers.go (about) 1 package controller 2 3 import ( 4 "context" 5 "fmt" 6 7 "github.com/quay/zlog" 8 ) 9 10 // scanLayers will run all scanner types against all layers if deemed necessary 11 // to scan 12 func scanLayers(ctx context.Context, c *Controller) (State, error) { 13 zlog.Info(ctx).Msg("layers scan start") 14 defer zlog.Info(ctx).Msg("layers scan done") 15 err := c.LayerScanner.Scan(ctx, c.manifest.Hash, c.manifest.Layers) 16 if err != nil { 17 return Terminal, fmt.Errorf("failed to scan all layer contents: %w", err) 18 } 19 zlog.Debug(ctx).Msg("layers scan ok") 20 return Coalesce, nil 21 }