Uploaded image for project: 'Clair'
  1. Clair
  2. CLAIRDEV-69

db: implement streaming/iterator in the current DB APIs (non-delta)

XMLWordPrintable

    • Icon: Feature Feature
    • Resolution: Done
    • Icon: Normal Normal
    • None
    • None
    • matcher

      Add iterator-based vulnerability/enrichment writes to the existing DB APIs.

      Ensure backward compatibility with non-iterator interfaces.

      Quoting hdonnay:

      I generally find that channels make for bad API surface because there's no way to communicate callee-cancellation (as in, if the function that has a channel passed in needs to exit early, the goroutine feeding the channel is live until GC or, if written correctly, a context expiration) and forces the use of an additional goroutine in otherwise straight-line code

      the rangefunc stuff can still be driven manually, so that would be my preference if you want to pursue the change

      Example/reference: https://github.com/quay/claircore/pull/1092/commits/123b1f68fe3fb2f1785de5c03b4ee6c0047976d3

              jvmartin@redhat.com J. Victor Martins
              jvmartin@redhat.com J. Victor Martins
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: