Add HTTP restricted artifact reader

This commit is contained in:
2026-07-28 00:40:25 +00:00
parent a74c03bd9b
commit 45c2644b9d
5 changed files with 359 additions and 154 deletions

View File

@@ -41,10 +41,16 @@ func NewCompositeReader() Reader {
}
}
// NewRestrictedCompositeReader is a temporary bridge for legacy adapter wiring.
// It has no compatibility promise and will be removed when those adapters use
// the public HTTP artifact reader.
func NewRestrictedCompositeReader(root string) (Reader, error) {
return NewRestrictedCompositeReaderWithLimit(root, 0)
}
// NewRestrictedCompositeReaderWithLimit is a temporary bridge for legacy
// adapter wiring. It has no compatibility promise and will be removed when
// those adapters use the public HTTP artifact reader.
func NewRestrictedCompositeReaderWithLimit(root string, maxBytes int64) (Reader, error) {
fileReader, err := newRestrictedFileReader(root, maxBytes)
if err != nil {