- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 84 for newCodecFactory (0.42 sec)
-
staging/src/k8s.io/apiserver/pkg/audit/policy/reader.go
} return ret, nil } func LoadPolicyFromBytes(policyDef []byte) (*auditinternal.Policy, error) { policy := &auditinternal.Policy{} strictDecoder := serializer.NewCodecFactory(audit.Scheme, serializer.EnableStrict).UniversalDecoder() // Try strict decoding first. _, gvk, err := strictDecoder.Decode(policyDef, nil, policy) if err != nil { if !runtime.IsStrictDecodingError(err) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Nov 03 04:09:40 UTC 2022 - 2.9K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/util/notfoundhandler/not_found_handler_test.go
func TestNotFoundHandler(t *testing.T) { isMuxAndDiscoveryCompleteGlobalValue := true isMuxAndDiscoveryCompleteTestFn := func(ctx context.Context) bool { return isMuxAndDiscoveryCompleteGlobalValue } serializer := serializer.NewCodecFactory(runtime.NewScheme()).WithoutConversion() target := New(serializer, isMuxAndDiscoveryCompleteTestFn) // scenario 1: pretend the request has been made after the signal has been ready
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Oct 19 11:26:59 UTC 2021 - 2.5K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/discovery/aggregated/wrapper.go
scheme := runtime.NewScheme() utilruntime.Must(apidiscoveryv2.AddToScheme(scheme)) utilruntime.Must(apidiscoveryv2beta1.AddToScheme(scheme)) codecs := serializer.NewCodecFactory(scheme) return &WrappedHandler{codecs, handler, aggHandler}
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Mar 01 18:15:22 UTC 2024 - 2.9K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/storage/storagebackend/factory/tls_test.go
"k8s.io/apiserver/pkg/storage/etcd3/testing/testingcert" "k8s.io/apiserver/pkg/storage/etcd3/testserver" "k8s.io/apiserver/pkg/storage/storagebackend" ) var scheme = runtime.NewScheme() var codecs = serializer.NewCodecFactory(scheme) func init() { metav1.AddToGroupVersion(scheme, metav1.SchemeGroupVersion) utilruntime.Must(example.AddToScheme(scheme)) utilruntime.Must(examplev1.AddToScheme(scheme)) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jun 07 17:57:37 UTC 2024 - 3.4K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/util/peerproxy/peerproxy_handler_test.go
//utilruntime.Must(core.AddToScheme(scheme)) utilruntime.Must(corev1.AddToScheme(scheme)) utilruntime.Must(scheme.SetVersionPriority(corev1.SchemeGroupVersion)) codecs := serializer.NewCodecFactory(scheme) sc.Codec = apitesting.TestStorageCodec(codecs, corev1.SchemeGroupVersion) config := *sc.ForResource(schema.GroupResource{Resource: "endpoints"}) baseKey := "/" + uuid.New().String() + "/peer-testleases/"
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 10.8K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher_testing_utils_test.go
storagetesting "k8s.io/apiserver/pkg/storage/testing" "k8s.io/apiserver/pkg/storage/value/encrypt/identity" ) var ( scheme = runtime.NewScheme() codecs = serializer.NewCodecFactory(scheme) errDummy = fmt.Errorf("dummy error") ) func init() { metav1.AddToGroupVersion(scheme, metav1.SchemeGroupVersion) utilruntime.Must(example.AddToScheme(scheme))
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Oct 20 20:43:52 UTC 2023 - 3.8K bytes - Viewed (0) -
istioctl/pkg/tag/generate_test.go
whURL: "", whSVC: "istiod-revision", whCA: "ca", userManaged: true, }, } scheme := runtime.NewScheme() codecFactory := serializer.NewCodecFactory(scheme) deserializer := codecFactory.UniversalDeserializer() fail := admitv1.Fail fakeClient := kube.NewFakeClient(&admitv1.ValidatingWebhookConfiguration{ TypeMeta: metav1.TypeMeta{},
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Jan 16 17:43:49 UTC 2024 - 12.1K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/objectmeta/coerce_test.go
utiljson "k8s.io/apimachinery/pkg/util/json" clientgoscheme "k8s.io/client-go/kubernetes/scheme" ) func TestRoundtripObjectMeta(t *testing.T) { scheme := runtime.NewScheme() codecs := serializer.NewCodecFactory(scheme) codec := json.NewSerializer(json.DefaultMetaFactory, scheme, scheme, false) seed := rand.Int63() fuzzer := fuzzer.FuzzerFor(metafuzzer.Funcs, rand.NewSource(seed), codecs) N := 1000
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 12 15:48:03 UTC 2023 - 12.7K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters/errors_test.go
} for _, test := range cases { observer := httptest.NewRecorder() scheme := runtime.NewScheme() negotiatedSerializer := serializer.NewCodecFactory(scheme).WithoutConversion() Forbidden(request.NewDefaultContext(), test.attributes, observer, &http.Request{URL: &url.URL{Path: "/path"}}, test.reason, negotiatedSerializer) result := observer.Body.String()
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Aug 29 07:45:20 UTC 2022 - 4.3K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/filters/authorization_test.go
authorizer.DecisionNoOpinion, "", errors.New("can't parse user info"), }, "", reasonError, }, } scheme := runtime.NewScheme() negotiatedSerializer := serializer.NewCodecFactory(scheme).WithoutConversion() for k, tc := range testcases { handler := WithAuthorization(&fakeHTTPHandler{}, tc.authorizer, negotiatedSerializer) // TODO: fake audit injector
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Jul 03 16:16:51 UTC 2023 - 5K bytes - Viewed (0)