Skip to content

Commit fe5608d

Browse files
authored
Merge pull request #17925 from rramkumar1/move-mutex
Move localmutexes.go to GCE-specific cloudup
2 parents 997bc67 + eb43d46 commit fe5608d

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

upup/pkg/fi/cloudup/gce/gce_cloud.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ import (
3636
"k8s.io/kops/dnsprovider/pkg/dnsprovider"
3737
"k8s.io/kops/dnsprovider/pkg/dnsprovider/providers/google/clouddns"
3838
"k8s.io/kops/pkg/apis/kops"
39-
"k8s.io/kops/pkg/mutexes"
4039
"k8s.io/kops/upup/pkg/fi"
4140
"k8s.io/kops/upup/pkg/fi/cloudup/gce/gcemetadata"
4241
)
@@ -60,8 +59,8 @@ type GCECloud interface {
6059
}
6160

6261
// MutexForProjectIAM returns a mutex to prevent local concurrent operations on project IAM.
63-
func MutexForProjectIAM(projectID string) mutexes.LocalMutex {
64-
return mutexes.InProcess.Get("iam/projects/" + projectID)
62+
func MutexForProjectIAM(projectID string) LocalMutex {
63+
return InProcessMutex.Get("iam/projects/" + projectID)
6564
}
6665

6766
type gceCloudImplementation struct {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
package mutexes
17+
package gce
1818

1919
import (
2020
"sync"
2121
)
2222

23-
var InProcess LocalMutexes
23+
var InProcessMutex LocalMutexes
2424

2525
// LocalMutexes is a store of named mutexes, used to avoid concurrent local operations.
2626
// For example, GCE project IAM mutation uses a read / conditional-write approach,

0 commit comments

Comments
 (0)