mirror of
https://github.com/containers/podman.git
synced 2025-11-30 01:58:46 +08:00
vendor latest c/{buildah,common,image,storage}
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
12
vendor/google.golang.org/grpc/mem/buffer_slice.go
generated
vendored
12
vendor/google.golang.org/grpc/mem/buffer_slice.go
generated
vendored
@@ -19,7 +19,6 @@
|
||||
package mem
|
||||
|
||||
import (
|
||||
"compress/flate"
|
||||
"io"
|
||||
)
|
||||
|
||||
@@ -92,9 +91,11 @@ func (s BufferSlice) Materialize() []byte {
|
||||
}
|
||||
|
||||
// MaterializeToBuffer functions like Materialize except that it writes the data
|
||||
// to a single Buffer pulled from the given BufferPool. As a special case, if the
|
||||
// input BufferSlice only actually has one Buffer, this function has nothing to
|
||||
// do and simply returns said Buffer.
|
||||
// to a single Buffer pulled from the given BufferPool.
|
||||
//
|
||||
// As a special case, if the input BufferSlice only actually has one Buffer, this
|
||||
// function simply increases the refcount before returning said Buffer. Freeing this
|
||||
// buffer won't release it until the BufferSlice is itself released.
|
||||
func (s BufferSlice) MaterializeToBuffer(pool BufferPool) Buffer {
|
||||
if len(s) == 1 {
|
||||
s[0].Ref()
|
||||
@@ -124,7 +125,8 @@ func (s BufferSlice) Reader() Reader {
|
||||
// Remaining(), which returns the number of unread bytes remaining in the slice.
|
||||
// Buffers will be freed as they are read.
|
||||
type Reader interface {
|
||||
flate.Reader
|
||||
io.Reader
|
||||
io.ByteReader
|
||||
// Close frees the underlying BufferSlice and never returns an error. Subsequent
|
||||
// calls to Read will return (0, io.EOF).
|
||||
Close() error
|
||||
|
||||
Reference in New Issue
Block a user