mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-11 22:20:18 +00:00
Rename Codec and ResourceVersioner to add Default in front, to allow for types of those names
This commit is contained in:
@@ -133,7 +133,7 @@ func (s ConfigSourceEtcd) GetServices() ([]api.Service, []api.Endpoints, error)
|
||||
// and create a Service entry for it.
|
||||
for i, node := range response.Node.Nodes {
|
||||
var svc api.Service
|
||||
err = runtime.DecodeInto([]byte(node.Value), &svc)
|
||||
err = runtime.DefaultCodec.DecodeInto([]byte(node.Value), &svc)
|
||||
if err != nil {
|
||||
glog.Errorf("Failed to load Service: %s (%#v)", node.Value, err)
|
||||
continue
|
||||
@@ -166,7 +166,7 @@ func (s ConfigSourceEtcd) GetEndpoints(service string) (api.Endpoints, error) {
|
||||
}
|
||||
// Parse all the endpoint specifications in this value.
|
||||
var e api.Endpoints
|
||||
err = runtime.DecodeInto([]byte(response.Node.Value), &e)
|
||||
err = runtime.DefaultCodec.DecodeInto([]byte(response.Node.Value), &e)
|
||||
return e, err
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ func etcdResponseToService(response *etcd.Response) (*api.Service, error) {
|
||||
return nil, fmt.Errorf("invalid response from etcd: %#v", response)
|
||||
}
|
||||
var svc api.Service
|
||||
err := runtime.DecodeInto([]byte(response.Node.Value), &svc)
|
||||
err := runtime.DefaultCodec.DecodeInto([]byte(response.Node.Value), &svc)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -230,7 +230,7 @@ func (s ConfigSourceEtcd) ProcessChange(response *etcd.Response) {
|
||||
func (s ConfigSourceEtcd) ProcessEndpointResponse(response *etcd.Response) {
|
||||
glog.Infof("Processing a change in endpoint configuration... %s", *response)
|
||||
var endpoints api.Endpoints
|
||||
err := runtime.DecodeInto([]byte(response.Node.Value), &endpoints)
|
||||
err := runtime.DefaultCodec.DecodeInto([]byte(response.Node.Value), &endpoints)
|
||||
if err != nil {
|
||||
glog.Errorf("Failed to parse service out of etcd key: %v : %+v", response.Node.Value, err)
|
||||
return
|
||||
|
Reference in New Issue
Block a user