mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-15 06:01:50 +00:00
remove dead negotiation methods
This commit is contained in:
@@ -92,39 +92,6 @@ func NewClientNegotiator(serializer NegotiatedSerializer, gv schema.GroupVersion
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewInternalClientNegotiator applies the default client rules for connecting to a Kubernetes apiserver
|
|
||||||
// where objects are converted to gv prior to sending and decoded to their internal representation prior
|
|
||||||
// to retrieval.
|
|
||||||
//
|
|
||||||
// DEPRECATED: Internal clients are deprecated and will be removed in a future Kubernetes release.
|
|
||||||
func NewInternalClientNegotiator(serializer NegotiatedSerializer, gv schema.GroupVersion) ClientNegotiator {
|
|
||||||
decode := schema.GroupVersions{
|
|
||||||
{
|
|
||||||
Group: gv.Group,
|
|
||||||
Version: APIVersionInternal,
|
|
||||||
},
|
|
||||||
// always include the legacy group as a decoding target to handle non-error `Status` return types
|
|
||||||
{
|
|
||||||
Group: "",
|
|
||||||
Version: APIVersionInternal,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
return &clientNegotiator{
|
|
||||||
encode: gv,
|
|
||||||
decode: decode,
|
|
||||||
serializer: serializer,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewSimpleClientNegotiator will negotiate for a single serializer. This should only be used
|
|
||||||
// for testing or when the caller is taking responsibility for setting the GVK on encoded objects.
|
|
||||||
func NewSimpleClientNegotiator(info SerializerInfo, gv schema.GroupVersion) ClientNegotiator {
|
|
||||||
return &clientNegotiator{
|
|
||||||
serializer: &simpleNegotiatedSerializer{info: info},
|
|
||||||
encode: gv,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
type simpleNegotiatedSerializer struct {
|
type simpleNegotiatedSerializer struct {
|
||||||
info SerializerInfo
|
info SerializerInfo
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user