Add HTTP restricted artifact reader
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user