mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 05:27:21 +00:00
make newFake* functions unexported
This commit is contained in:
parent
1bf1c0d4d5
commit
c3050e3ab4
@ -36,7 +36,7 @@ type fakeAzureLBClient struct {
|
|||||||
FakeStore map[string]map[string]network.LoadBalancer
|
FakeStore map[string]map[string]network.LoadBalancer
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewFakeAzureLBClient() fakeAzureLBClient {
|
func newFakeAzureLBClient() fakeAzureLBClient {
|
||||||
fLBC := fakeAzureLBClient{}
|
fLBC := fakeAzureLBClient{}
|
||||||
fLBC.FakeStore = make(map[string]map[string]network.LoadBalancer)
|
fLBC.FakeStore = make(map[string]map[string]network.LoadBalancer)
|
||||||
fLBC.mutex = &sync.Mutex{}
|
fLBC.mutex = &sync.Mutex{}
|
||||||
@ -166,7 +166,7 @@ func getpublicIPAddressID(subscriptionID string, resourceGroupName, pipName stri
|
|||||||
pipName)
|
pipName)
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewFakeAzurePIPClient(subscriptionID string) fakeAzurePIPClient {
|
func newFakeAzurePIPClient(subscriptionID string) fakeAzurePIPClient {
|
||||||
fAPC := fakeAzurePIPClient{}
|
fAPC := fakeAzurePIPClient{}
|
||||||
fAPC.FakeStore = make(map[string]map[string]network.PublicIPAddress)
|
fAPC.FakeStore = make(map[string]map[string]network.PublicIPAddress)
|
||||||
fAPC.SubscriptionID = subscriptionID
|
fAPC.SubscriptionID = subscriptionID
|
||||||
@ -285,7 +285,7 @@ type fakeAzureInterfacesClient struct {
|
|||||||
FakeStore map[string]map[string]network.Interface
|
FakeStore map[string]map[string]network.Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewFakeAzureInterfacesClient() fakeAzureInterfacesClient {
|
func newFakeAzureInterfacesClient() fakeAzureInterfacesClient {
|
||||||
fIC := fakeAzureInterfacesClient{}
|
fIC := fakeAzureInterfacesClient{}
|
||||||
fIC.FakeStore = make(map[string]map[string]network.Interface)
|
fIC.FakeStore = make(map[string]map[string]network.Interface)
|
||||||
fIC.mutex = &sync.Mutex{}
|
fIC.mutex = &sync.Mutex{}
|
||||||
@ -335,7 +335,7 @@ type fakeAzureVirtualMachinesClient struct {
|
|||||||
FakeStore map[string]map[string]compute.VirtualMachine
|
FakeStore map[string]map[string]compute.VirtualMachine
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewFakeAzureVirtualMachinesClient() fakeAzureVirtualMachinesClient {
|
func newFakeAzureVirtualMachinesClient() fakeAzureVirtualMachinesClient {
|
||||||
fVMC := fakeAzureVirtualMachinesClient{}
|
fVMC := fakeAzureVirtualMachinesClient{}
|
||||||
fVMC.FakeStore = make(map[string]map[string]compute.VirtualMachine)
|
fVMC.FakeStore = make(map[string]map[string]compute.VirtualMachine)
|
||||||
fVMC.mutex = &sync.Mutex{}
|
fVMC.mutex = &sync.Mutex{}
|
||||||
@ -405,7 +405,7 @@ type fakeAzureSubnetsClient struct {
|
|||||||
FakeStore map[string]map[string]network.Subnet
|
FakeStore map[string]map[string]network.Subnet
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewFakeAzureSubnetsClient() fakeAzureSubnetsClient {
|
func newFakeAzureSubnetsClient() fakeAzureSubnetsClient {
|
||||||
fASC := fakeAzureSubnetsClient{}
|
fASC := fakeAzureSubnetsClient{}
|
||||||
fASC.FakeStore = make(map[string]map[string]network.Subnet)
|
fASC.FakeStore = make(map[string]map[string]network.Subnet)
|
||||||
fASC.mutex = &sync.Mutex{}
|
fASC.mutex = &sync.Mutex{}
|
||||||
@ -506,7 +506,7 @@ type fakeAzureNSGClient struct {
|
|||||||
FakeStore map[string]map[string]network.SecurityGroup
|
FakeStore map[string]map[string]network.SecurityGroup
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewFakeAzureNSGClient() fakeAzureNSGClient {
|
func newFakeAzureNSGClient() fakeAzureNSGClient {
|
||||||
fNSG := fakeAzureNSGClient{}
|
fNSG := fakeAzureNSGClient{}
|
||||||
fNSG.FakeStore = make(map[string]map[string]network.SecurityGroup)
|
fNSG.FakeStore = make(map[string]map[string]network.SecurityGroup)
|
||||||
fNSG.mutex = &sync.Mutex{}
|
fNSG.mutex = &sync.Mutex{}
|
||||||
|
@ -818,12 +818,12 @@ func getTestCloud() (az *Cloud) {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
az.operationPollRateLimiter = flowcontrol.NewTokenBucketRateLimiter(100, 100)
|
az.operationPollRateLimiter = flowcontrol.NewTokenBucketRateLimiter(100, 100)
|
||||||
az.LoadBalancerClient = NewFakeAzureLBClient()
|
az.LoadBalancerClient = newFakeAzureLBClient()
|
||||||
az.PublicIPAddressesClient = NewFakeAzurePIPClient(az.Config.SubscriptionID)
|
az.PublicIPAddressesClient = newFakeAzurePIPClient(az.Config.SubscriptionID)
|
||||||
az.SubnetsClient = NewFakeAzureSubnetsClient()
|
az.SubnetsClient = newFakeAzureSubnetsClient()
|
||||||
az.SecurityGroupsClient = NewFakeAzureNSGClient()
|
az.SecurityGroupsClient = newFakeAzureNSGClient()
|
||||||
az.VirtualMachinesClient = NewFakeAzureVirtualMachinesClient()
|
az.VirtualMachinesClient = newFakeAzureVirtualMachinesClient()
|
||||||
az.InterfacesClient = NewFakeAzureInterfacesClient()
|
az.InterfacesClient = newFakeAzureInterfacesClient()
|
||||||
|
|
||||||
return az
|
return az
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user