- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for NewSerializer (0.38 sec)
-
staging/src/k8s.io/apimachinery/pkg/runtime/serializer/encoder_with_allocator_test.go
"k8s.io/apimachinery/pkg/runtime/serializer/protobuf" ) func BenchmarkProtobufEncoder(b *testing.B) { benchmarkEncodeFor(b, protobuf.NewSerializer(nil, nil)) } func BenchmarkProtobufEncodeWithAllocator(b *testing.B) { benchmarkEncodeWithAllocatorFor(b, protobuf.NewSerializer(nil, nil)) } func BenchmarkRawProtobufEncoder(b *testing.B) { benchmarkEncodeFor(b, protobuf.NewRawSerializer(nil, nil)) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Feb 23 13:38:29 UTC 2022 - 3.6K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/test/runtime_serializer_protobuf_protobuf_test.go
return len(d.data) } func (d *testBufferedMarshalable) DeepCopyObject() runtime.Object { panic("testBufferedMarshalable does not support DeepCopy") } func TestRecognize(t *testing.T) { s := protobuf.NewSerializer(nil, nil) ignores := [][]byte{ nil, {}, []byte("k8s"), {0x6b, 0x38, 0x73, 0x01}, } for i, data := range ignores { if ok, _, err := s.RecognizesData(data); err != nil || ok {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 12 15:46:16 UTC 2023 - 8.9K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/protobuf_test.go
creater := &mockCreater{obj: &runtimetesting.MockCacheableObject{}} typer := &mockTyper{gvk: &gvk} encoders := []runtime.Encoder{ NewSerializer(creater, typer), NewRawSerializer(creater, typer), } for _, encoder := range encoders { runtimetesting.CacheableObjectTest(t, encoder) } } type mockCreater struct { apiVersion string
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jul 27 03:17:50 UTC 2022 - 5K bytes - Viewed (0) -
pkg/api/testing/serialization_proto_test.go
// reflection (to clear APIVersion and Kind) func BenchmarkEncodeCodecProtobuf(b *testing.B) { items := benchmarkItems(b) width := len(items) s := protobuf.NewSerializer(nil, nil) b.ResetTimer() for i := 0; i < b.N; i++ { if _, err := runtime.Encode(s, &items[i%width]); err != nil { b.Fatal(err) } } b.StopTimer() }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Jun 25 16:23:43 UTC 2022 - 7.1K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/runtime/serializer/cbor/cbor.go
creater runtime.ObjectCreater typer runtime.ObjectTyper options options } func NewSerializer(creater runtime.ObjectCreater, typer runtime.ObjectTyper, options ...Option) Serializer { return newSerializer(&defaultMetaFactory{}, creater, typer, options...) } func newSerializer(metaFactory metaFactory, creater runtime.ObjectCreater, typer runtime.ObjectTyper, options ...Option) *serializer { s := &serializer{
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon May 13 14:57:12 UTC 2024 - 9.6K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/plugin/pkg/audit/webhook/webhook_test.go
// The object passed to cb is of the same type as list. func newWebhookHandler(t *testing.T, list runtime.Object, cb func(events runtime.Object)) http.Handler { s := json.NewSerializer(json.DefaultMetaFactory, audit.Scheme, audit.Scheme, false) return &testWebhookHandler{ t: t, list: list, onEvents: cb, serializer: s, } } type testWebhookHandler struct {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Mar 08 06:37:26 UTC 2022 - 3.9K bytes - Viewed (0) -
tests/fuzz/crd_roundtrip_fuzzer.go
if err != nil { return 0 } err = checkForNilValues(object) if err != nil { return 0 } typeAcc.SetKind(kgvk.Kind) typeAcc.SetAPIVersion(kgvk.GroupVersion().String()) roundTrip(json.NewSerializer(json.DefaultMetaFactory, scheme, scheme, false), object) return 1 } // roundTrip performs the roundtrip of the object. func roundTrip(codec runtime.Codec, object runtime.Object) {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Mar 01 01:34:15 UTC 2023 - 5.8K bytes - Viewed (0)