mirror of
https://github.com/containers/podman.git
synced 2025-11-30 01:58:46 +08:00
Update module google.golang.org/grpc to v1.76.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit is contained in:
11
vendor/google.golang.org/grpc/mem/buffer_slice.go
generated
vendored
11
vendor/google.golang.org/grpc/mem/buffer_slice.go
generated
vendored
@@ -137,6 +137,9 @@ type Reader interface {
|
||||
Close() error
|
||||
// Remaining returns the number of unread bytes remaining in the slice.
|
||||
Remaining() int
|
||||
// Reset frees the currently held buffer slice and starts reading from the
|
||||
// provided slice. This allows reusing the reader object.
|
||||
Reset(s BufferSlice)
|
||||
}
|
||||
|
||||
type sliceReader struct {
|
||||
@@ -150,6 +153,14 @@ func (r *sliceReader) Remaining() int {
|
||||
return r.len
|
||||
}
|
||||
|
||||
func (r *sliceReader) Reset(s BufferSlice) {
|
||||
r.data.Free()
|
||||
s.Ref()
|
||||
r.data = s
|
||||
r.len = s.Len()
|
||||
r.bufferIdx = 0
|
||||
}
|
||||
|
||||
func (r *sliceReader) Close() error {
|
||||
r.data.Free()
|
||||
r.data = nil
|
||||
|
||||
Reference in New Issue
Block a user