mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 13:37:30 +00:00
Fix codestyle
This commit is contained in:
parent
758c9666e5
commit
7ba30afbed
@ -199,7 +199,7 @@ type endpointsChange struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type endpointsChangeMap struct {
|
type endpointsChangeMap struct {
|
||||||
sync.Mutex
|
lock sync.Mutex
|
||||||
hostname string
|
hostname string
|
||||||
items map[types.NamespacedName]*endpointsChange
|
items map[types.NamespacedName]*endpointsChange
|
||||||
}
|
}
|
||||||
@ -210,7 +210,7 @@ type serviceChange struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type serviceChangeMap struct {
|
type serviceChangeMap struct {
|
||||||
sync.Mutex
|
lock sync.Mutex
|
||||||
items map[types.NamespacedName]*serviceChange
|
items map[types.NamespacedName]*serviceChange
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -225,8 +225,8 @@ func newEndpointsChangeMap(hostname string) endpointsChangeMap {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (ecm *endpointsChangeMap) update(namespacedName *types.NamespacedName, previous, current *api.Endpoints) bool {
|
func (ecm *endpointsChangeMap) update(namespacedName *types.NamespacedName, previous, current *api.Endpoints) bool {
|
||||||
ecm.Lock()
|
ecm.lock.Lock()
|
||||||
defer ecm.Unlock()
|
defer ecm.lock.Unlock()
|
||||||
|
|
||||||
change, exists := ecm.items[*namespacedName]
|
change, exists := ecm.items[*namespacedName]
|
||||||
if !exists {
|
if !exists {
|
||||||
@ -254,8 +254,8 @@ func newServiceChangeMap() serviceChangeMap {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (scm *serviceChangeMap) update(namespacedName *types.NamespacedName, previous, current *api.Service) bool {
|
func (scm *serviceChangeMap) update(namespacedName *types.NamespacedName, previous, current *api.Service) bool {
|
||||||
scm.Lock()
|
scm.lock.Lock()
|
||||||
defer scm.Unlock()
|
defer scm.lock.Unlock()
|
||||||
|
|
||||||
change, exists := scm.items[*namespacedName]
|
change, exists := scm.items[*namespacedName]
|
||||||
if !exists {
|
if !exists {
|
||||||
@ -664,8 +664,8 @@ func updateServiceMap(
|
|||||||
staleServices = sets.NewString()
|
staleServices = sets.NewString()
|
||||||
|
|
||||||
func() {
|
func() {
|
||||||
changes.Lock()
|
changes.lock.Lock()
|
||||||
defer changes.Unlock()
|
defer changes.lock.Unlock()
|
||||||
for _, change := range changes.items {
|
for _, change := range changes.items {
|
||||||
existingPorts := serviceMap.merge(change.current)
|
existingPorts := serviceMap.merge(change.current)
|
||||||
serviceMap.unmerge(change.previous, existingPorts, staleServices)
|
serviceMap.unmerge(change.previous, existingPorts, staleServices)
|
||||||
@ -741,8 +741,8 @@ func updateEndpointsMap(
|
|||||||
staleSet = make(map[endpointServicePair]bool)
|
staleSet = make(map[endpointServicePair]bool)
|
||||||
|
|
||||||
func() {
|
func() {
|
||||||
changes.Lock()
|
changes.lock.Lock()
|
||||||
defer changes.Unlock()
|
defer changes.lock.Unlock()
|
||||||
for _, change := range changes.items {
|
for _, change := range changes.items {
|
||||||
endpointsMap.unmerge(change.previous)
|
endpointsMap.unmerge(change.previous)
|
||||||
endpointsMap.merge(change.current)
|
endpointsMap.merge(change.current)
|
||||||
|
Loading…
Reference in New Issue
Block a user