Skip to content

Commit 7ee0380

Browse files
committed
s/azureClient/Azureclient
make networkinterfaces.AzureClient exportable so that it can be hygienically used as a return value for the exported NewClient func Signed-off-by: Jack Francis <[email protected]>
1 parent 3fd5352 commit 7ee0380

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

azure/services/networkinterfaces/client.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ import (
2929
"sigs.k8s.io/cluster-api-provider-azure/util/tele"
3030
)
3131

32-
// azureClient contains the Azure go-sdk Client.
33-
type azureClient struct {
32+
// AzureClient contains the Azure go-sdk Client.
33+
type AzureClient struct {
3434
interfaces *armnetwork.InterfacesClient
3535
apiCallTimeout time.Duration
3636
}
3737

3838
// NewClient creates a new network interfaces client from an authorizer.
39-
func NewClient(auth azure.Authorizer, apiCallTimeout time.Duration) (*azureClient, error) {
39+
func NewClient(auth azure.Authorizer, apiCallTimeout time.Duration) (*AzureClient, error) {
4040
opts, err := azure.ARMClientOptions(auth.CloudEnvironment())
4141
if err != nil {
4242
return nil, errors.Wrap(err, "failed to create networkinterfaces client options")
@@ -45,11 +45,11 @@ func NewClient(auth azure.Authorizer, apiCallTimeout time.Duration) (*azureClien
4545
if err != nil {
4646
return nil, errors.Wrap(err, "failed to create armnetwork client factory")
4747
}
48-
return &azureClient{factory.NewInterfacesClient(), apiCallTimeout}, nil
48+
return &AzureClient{factory.NewInterfacesClient(), apiCallTimeout}, nil
4949
}
5050

5151
// Get gets the specified network interface.
52-
func (ac *azureClient) Get(ctx context.Context, spec azure.ResourceSpecGetter) (result interface{}, err error) {
52+
func (ac *AzureClient) Get(ctx context.Context, spec azure.ResourceSpecGetter) (result interface{}, err error) {
5353
ctx, _, done := tele.StartSpanWithLogger(ctx, "networkinterfaces.AzureClient.Get")
5454
defer done()
5555

@@ -63,7 +63,7 @@ func (ac *azureClient) Get(ctx context.Context, spec azure.ResourceSpecGetter) (
6363
// CreateOrUpdateAsync creates or updates a network interface asynchronously.
6464
// It sends a PUT request to Azure and if accepted without error, the func will return a poller which can be used to track the ongoing
6565
// progress of the operation.
66-
func (ac *azureClient) CreateOrUpdateAsync(ctx context.Context, spec azure.ResourceSpecGetter, opts azure.CreateOrUpdateAsyncOpts) (result interface{}, poller *runtime.Poller[armnetwork.InterfacesClientCreateOrUpdateResponse], err error) {
66+
func (ac *AzureClient) CreateOrUpdateAsync(ctx context.Context, spec azure.ResourceSpecGetter, opts azure.CreateOrUpdateAsyncOpts) (result interface{}, poller *runtime.Poller[armnetwork.InterfacesClientCreateOrUpdateResponse], err error) {
6767
ctx, _, done := tele.StartSpanWithLogger(ctx, "networkinterfaces.AzureClient.CreateOrUpdateAsync")
6868
defer done()
6969

@@ -96,7 +96,7 @@ func (ac *azureClient) CreateOrUpdateAsync(ctx context.Context, spec azure.Resou
9696
// DeleteAsync deletes a network interface asynchronously. DeleteAsync sends a DELETE
9797
// request to Azure and if accepted without error, the func will return a poller which can be used to track the ongoing
9898
// progress of the operation.
99-
func (ac *azureClient) DeleteAsync(ctx context.Context, spec azure.ResourceSpecGetter, resumeToken string) (poller *runtime.Poller[armnetwork.InterfacesClientDeleteResponse], err error) {
99+
func (ac *AzureClient) DeleteAsync(ctx context.Context, spec azure.ResourceSpecGetter, resumeToken string) (poller *runtime.Poller[armnetwork.InterfacesClientDeleteResponse], err error) {
100100
ctx, _, done := tele.StartSpanWithLogger(ctx, "networkinterfaces.AzureClient.DeleteAsync")
101101
defer done()
102102

0 commit comments

Comments
 (0)