mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-12 22:47:09 +08:00
vendor: bump k8s to v0.25.4
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
21
vendor/k8s.io/apimachinery/pkg/runtime/serializer/streaming/streaming.go
generated
vendored
21
vendor/k8s.io/apimachinery/pkg/runtime/serializer/streaming/streaming.go
generated
vendored
@ -90,7 +90,6 @@ func (d *decoder) Decode(defaults *schema.GroupVersionKind, into runtime.Object)
|
||||
}
|
||||
// must read the rest of the frame (until we stop getting ErrShortBuffer)
|
||||
d.resetRead = true
|
||||
base = 0
|
||||
return nil, nil, ErrObjectTooLarge
|
||||
}
|
||||
if err != nil {
|
||||
@ -135,3 +134,23 @@ func (e *encoder) Encode(obj runtime.Object) error {
|
||||
e.buf.Reset()
|
||||
return err
|
||||
}
|
||||
|
||||
type encoderWithAllocator struct {
|
||||
writer io.Writer
|
||||
encoder runtime.EncoderWithAllocator
|
||||
memAllocator runtime.MemoryAllocator
|
||||
}
|
||||
|
||||
// NewEncoderWithAllocator returns a new streaming encoder
|
||||
func NewEncoderWithAllocator(w io.Writer, e runtime.EncoderWithAllocator, a runtime.MemoryAllocator) Encoder {
|
||||
return &encoderWithAllocator{
|
||||
writer: w,
|
||||
encoder: e,
|
||||
memAllocator: a,
|
||||
}
|
||||
}
|
||||
|
||||
// Encode writes the provided object to the nested writer
|
||||
func (e *encoderWithAllocator) Encode(obj runtime.Object) error {
|
||||
return e.encoder.EncodeWithAllocator(obj, e.writer, e.memAllocator)
|
||||
}
|
||||
|
Reference in New Issue
Block a user