- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 33 for supportedMediaTypes (0.28 sec)
-
staging/src/k8s.io/apiserver/pkg/server/storage/storage_codec.go
return nil, nil, fmt.Errorf("%q is not a valid mime-type", opts.StorageMediaType) } supportedMediaTypes := opts.StorageSerializer.SupportedMediaTypes() serializer, ok := runtime.SerializerInfoForMediaType(supportedMediaTypes, mediaType) if !ok { supportedMediaTypeList := make([]string, len(supportedMediaTypes)) for i, mediaType := range supportedMediaTypes { supportedMediaTypeList[i] = mediaType.MediaType }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Nov 05 15:03:23 UTC 2022 - 3.8K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/runtime/negotiate.go
// TODO: `pretty=1` is handled in NegotiateOutputMediaType, consider moving it to this method // if client negotiators truly need to use it mediaTypes := n.serializer.SupportedMediaTypes() info, ok := SerializerInfoForMediaType(mediaTypes, contentType) if !ok { if len(contentType) != 0 || len(mediaTypes) == 0 { return nil, NegotiateError{ContentType: contentType} } info = mediaTypes[0]
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Oct 29 19:55:06 UTC 2020 - 3.7K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/api/apitesting/codec.go
// KUBE_TEST_API_TYPE env var. func TestCodec(codecs runtimeserializer.CodecFactory, gvs ...schema.GroupVersion) runtime.Codec { if len(testCodecMediaType) != 0 { serializerInfo, ok := runtime.SerializerInfoForMediaType(codecs.SupportedMediaTypes(), testCodecMediaType) if !ok { panic(fmt.Sprintf("no serializer for %s", testCodecMediaType)) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Aug 01 19:31:12 UTC 2018 - 3.9K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/handlers/negotiation/negotiate.go
) // MediaTypesForSerializer returns a list of media and stream media types for the server. func MediaTypesForSerializer(ns runtime.NegotiatedSerializer) (mediaTypes, streamMediaTypes []string) { for _, info := range ns.SupportedMediaTypes() { mediaTypes = append(mediaTypes, info.MediaType) if info.StreamSerializer != nil { // stream=watch is the existing mime-type parameter for watch
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Oct 10 10:53:34 UTC 2019 - 9.5K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/runtime/serializer/negotiated_codec.go
info runtime.SerializerInfo } func NegotiatedSerializerWrapper(info runtime.SerializerInfo) runtime.NegotiatedSerializer { return &negotiatedSerializerWrapper{info} } func (n *negotiatedSerializerWrapper) SupportedMediaTypes() []runtime.SerializerInfo { return []runtime.SerializerInfo{n.info} } func (n *negotiatedSerializerWrapper) EncoderForVersion(e runtime.Encoder, _ runtime.GroupVersioner) runtime.Encoder { return e }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jan 11 14:09:48 UTC 2017 - 1.3K bytes - Viewed (0) -
pkg/kubelet/config/common_test.go
} for _, gv := range legacyscheme.Scheme.PrioritizedVersionsForGroup(v1.GroupName) { info, _ := runtime.SerializerInfoForMediaType(legacyscheme.Codecs.SupportedMediaTypes(), "application/yaml") encoder := legacyscheme.Codecs.EncoderForVersion(info.Serializer, gv) yaml, err := runtime.Encode(encoder, pod) if err != nil { t.Errorf("unexpected error: %v", err) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Nov 03 18:40:48 UTC 2023 - 8.7K bytes - Viewed (0) -
cmd/kube-scheduler/app/options/configfile.go
} func encodeConfig(cfg *config.KubeSchedulerConfiguration) (*bytes.Buffer, error) { buf := new(bytes.Buffer) const mediaType = runtime.ContentTypeYAML info, ok := runtime.SerializerInfoForMediaType(scheme.Codecs.SupportedMediaTypes(), mediaType) if !ok { return buf, fmt.Errorf("unable to locate encoder -- %q is not a supported media type", mediaType) } var encoder runtime.Encoder switch cfg.TypeMeta.APIVersion {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Aug 17 05:27:21 UTC 2023 - 3.4K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructuredscheme/scheme.go
} } type unstructuredNegotiatedSerializer struct { scheme *runtime.Scheme typer runtime.ObjectTyper creator runtime.ObjectCreater } func (s unstructuredNegotiatedSerializer) SupportedMediaTypes() []runtime.SerializerInfo { return []runtime.SerializerInfo{ { MediaType: "application/json", MediaTypeType: "application", MediaTypeSubType: "json", EncodesAsText: true,
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Aug 27 12:37:23 UTC 2020 - 4.2K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/discovery/aggregated/wrapper.go
if utilfeature.DefaultFeatureGate.Enabled(genericfeatures.AggregatedDiscoveryEndpoint) { mediaType, _ := negotiation.NegotiateMediaTypeOptions(req.Header.Get("Accept"), wrapped.s.SupportedMediaTypes(), DiscoveryEndpointRestrictions) // mediaType.Convert looks at the request accept headers and is used to control whether the discovery document will be aggregated. if IsAggregatedDiscoveryGVK(mediaType.Convert) {
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/cli-runtime/pkg/resource/scheme.go
// TODO: scheme.Codecs here should become "pkg/apis/server/scheme" which is the minimal core you need // to talk to a kubernetes server jsonInfo, _ := runtime.SerializerInfoForMediaType(scheme.Codecs.SupportedMediaTypes(), runtime.ContentTypeJSON) jsonInfo.Serializer = dynamicCodec{} jsonInfo.PrettySerializer = nil return rest.ContentConfig{ AcceptContentTypes: runtime.ContentTypeJSON,
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Oct 21 15:58:15 UTC 2022 - 2.8K bytes - Viewed (0)