mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +00:00
Use pointer for struct holding lock.
This commit is contained in:
parent
e1cb72f1ae
commit
42f6324183
@ -111,7 +111,7 @@ type Kubelet struct {
|
||||
dockerClient dockertools.DockerInterface
|
||||
rootDirectory string
|
||||
networkContainerImage string
|
||||
podWorkers podWorkers
|
||||
podWorkers *podWorkers
|
||||
resyncInterval time.Duration
|
||||
pods []Pod
|
||||
|
||||
@ -157,8 +157,8 @@ type podWorkers struct {
|
||||
workers util.StringSet
|
||||
}
|
||||
|
||||
func newPodWorkers() podWorkers {
|
||||
return podWorkers{
|
||||
func newPodWorkers() *podWorkers {
|
||||
return &podWorkers{
|
||||
workers: util.NewStringSet(),
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user