feat(tvix/glue): Add refscanner pattern and AsyncRead

This splits the existing ReferenceScanner into a ReferenceScanner and
ReferencePattern as well as adds an AsyncRead implementation that can
do a scan while you read from it.

The reason to split the scanner in two is that generating the pattern
is expensive and when ingesting build results with multiple outputs you
want to do several independant scans that look for the same pattern.

The reader is for scanning files without having to load the entire file
into memory.

Change-Id: I993f5a32308c12d9035840f8e04fe82e8dc1d962
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12052
Autosubmit: Brian Olsen <me@griff.name>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
This commit is contained in:
Brian Olsen 2024-07-22 15:44:42 +02:00 committed by clbot
parent 9d20176241
commit 3cd57ce4e3
4 changed files with 249 additions and 22 deletions

1
tvix/Cargo.lock generated
View file

@ -4977,6 +4977,7 @@ dependencies = [
"thiserror",
"tokio",
"tokio-tar",
"tokio-test",
"tokio-util",
"tracing",
"tracing-indicatif",