mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +00:00
rebase: update k8s.io packages to v0.29.0
Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
committed by
mergify[bot]
parent
328a264202
commit
f080b9e0c9
23
vendor/k8s.io/apimachinery/pkg/runtime/helper.go
generated
vendored
23
vendor/k8s.io/apimachinery/pkg/runtime/helper.go
generated
vendored
@ -257,3 +257,26 @@ func (d WithoutVersionDecoder) Decode(data []byte, defaults *schema.GroupVersion
|
||||
}
|
||||
return obj, gvk, err
|
||||
}
|
||||
|
||||
type encoderWithAllocator struct {
|
||||
encoder EncoderWithAllocator
|
||||
memAllocator MemoryAllocator
|
||||
}
|
||||
|
||||
// NewEncoderWithAllocator returns a new encoder
|
||||
func NewEncoderWithAllocator(e EncoderWithAllocator, a MemoryAllocator) Encoder {
|
||||
return &encoderWithAllocator{
|
||||
encoder: e,
|
||||
memAllocator: a,
|
||||
}
|
||||
}
|
||||
|
||||
// Encode writes the provided object to the nested writer
|
||||
func (e *encoderWithAllocator) Encode(obj Object, w io.Writer) error {
|
||||
return e.encoder.EncodeWithAllocator(obj, w, e.memAllocator)
|
||||
}
|
||||
|
||||
// Identifier returns identifier of this encoder.
|
||||
func (e *encoderWithAllocator) Identifier() Identifier {
|
||||
return e.encoder.Identifier()
|
||||
}
|
||||
|
Reference in New Issue
Block a user