[otel-tracing] vendor and go modules changes

This tracks all the vendor file changes and changes to go modules due
to OpenTelemetry support

Signed-off-by: Alakesh Haloi <alakeshh@amazon.com>
This commit is contained in:
Alakesh Haloi
2021-07-17 23:28:41 -07:00
parent 3597ac859d
commit 3c5424454b
228 changed files with 35945 additions and 67 deletions

View File

@@ -0,0 +1,20 @@
package utilities
import (
"bytes"
"io"
"io/ioutil"
)
// IOReaderFactory takes in an io.Reader and returns a function that will allow you to create a new reader that begins
// at the start of the stream
func IOReaderFactory(r io.Reader) (func() io.Reader, error) {
b, err := ioutil.ReadAll(r)
if err != nil {
return nil, err
}
return func() io.Reader {
return bytes.NewReader(b)
}, nil
}