mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 23:15:14 +00:00
Use plus-v format for some complex structures.
This commit is contained in:
parent
993ef88eec
commit
9964410f77
@ -125,17 +125,17 @@ func (s *endpointsStore) Merge(source string, change interface{}) error {
|
||||
update := change.(EndpointsUpdate)
|
||||
switch update.Op {
|
||||
case ADD:
|
||||
glog.V(4).Infof("Adding new endpoint from source %s : %v", source, update.Endpoints)
|
||||
glog.V(4).Infof("Adding new endpoint from source %s : %+v", source, update.Endpoints)
|
||||
for _, value := range update.Endpoints {
|
||||
endpoints[value.Name] = value
|
||||
}
|
||||
case REMOVE:
|
||||
glog.V(4).Infof("Removing an endpoint %v", update)
|
||||
glog.V(4).Infof("Removing an endpoint %+v", update)
|
||||
for _, value := range update.Endpoints {
|
||||
delete(endpoints, value.Name)
|
||||
}
|
||||
case SET:
|
||||
glog.V(4).Infof("Setting endpoints %v", update)
|
||||
glog.V(4).Infof("Setting endpoints %+v", update)
|
||||
// Clear the old map entries by just creating a new map
|
||||
endpoints = make(map[string]api.Endpoints)
|
||||
for _, value := range update.Endpoints {
|
||||
@ -220,17 +220,17 @@ func (s *serviceStore) Merge(source string, change interface{}) error {
|
||||
update := change.(ServiceUpdate)
|
||||
switch update.Op {
|
||||
case ADD:
|
||||
glog.V(4).Infof("Adding new service from source %s : %v", source, update.Services)
|
||||
glog.V(4).Infof("Adding new service from source %s : %+v", source, update.Services)
|
||||
for _, value := range update.Services {
|
||||
services[value.Name] = value
|
||||
}
|
||||
case REMOVE:
|
||||
glog.V(4).Infof("Removing a service %v", update)
|
||||
glog.V(4).Infof("Removing a service %+v", update)
|
||||
for _, value := range update.Services {
|
||||
delete(services, value.Name)
|
||||
}
|
||||
case SET:
|
||||
glog.V(4).Infof("Setting services %v", update)
|
||||
glog.V(4).Infof("Setting services %+v", update)
|
||||
// Clear the old map entries by just creating a new map
|
||||
services = make(map[string]api.Service)
|
||||
for _, value := range update.Services {
|
||||
|
Loading…
Reference in New Issue
Block a user