Skip to content

Commit 0725655

Browse files
committed
Conformant package name
1 parent 7e65648 commit 0725655

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

lib/srv/discovery/access_graph_azure.go

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,19 @@ import (
3535
accessgraphv1alpha "github.com/gravitational/teleport/gen/proto/go/accessgraph/v1alpha"
3636
"github.com/gravitational/teleport/lib/modules"
3737
"github.com/gravitational/teleport/lib/services"
38-
azure_sync "github.com/gravitational/teleport/lib/srv/discovery/fetchers/azure-sync"
38+
"github.com/gravitational/teleport/lib/srv/discovery/fetchers/azure-sync"
3939
)
4040

4141
// reconcileAccessGraphAzure fetches Azure resources, creates a set of resources to delete and upsert based on
4242
// the previous fetch, and then sends the delete and upsert results to the Access Graph stream
4343
func (s *Server) reconcileAccessGraphAzure(
4444
ctx context.Context,
45-
currentTAGResources *azure_sync.Resources,
45+
currentTAGResources *azuresync.Resources,
4646
stream accessgraphv1alpha.AccessGraphService_AzureEventsStreamClient,
47-
features azure_sync.Features,
47+
features azuresync.Features,
4848
) error {
4949
type fetcherResult struct {
50-
result *azure_sync.Resources
50+
result *azuresync.Resources
5151
err error
5252
}
5353

@@ -56,7 +56,7 @@ func (s *Server) reconcileAccessGraphAzure(
5656
if len(allFetchers) == 0 {
5757
// If there are no fetchers, we don't need to continue.
5858
// We will send a delete request for all resources and return.
59-
upsert, toDel := azure_sync.ReconcileResults(currentTAGResources, &azure_sync.Resources{})
59+
upsert, toDel := azuresync.ReconcileResults(currentTAGResources, &azuresync.Resources{})
6060

6161
if err := azurePush(stream, upsert, toDel); err != nil {
6262
s.Log.ErrorContext(ctx, "Error pushing empty resources to TAGs", "error", err)
@@ -82,7 +82,7 @@ func (s *Server) reconcileAccessGraphAzure(
8282
}
8383

8484
// Collect the results from all fetchers.
85-
results := make([]*azure_sync.Resources, 0, len(allFetchers))
85+
results := make([]*azuresync.Resources, 0, len(allFetchers))
8686
errs := make([]error, 0, len(allFetchers))
8787
for i := 0; i < len(allFetchers); i++ {
8888
// Each fetcher can return an error and a result.
@@ -100,10 +100,10 @@ func (s *Server) reconcileAccessGraphAzure(
100100
if err != nil {
101101
s.Log.ErrorContext(ctx, "Error polling TAGs", "error", err)
102102
}
103-
result := azure_sync.MergeResources(results...)
103+
result := azuresync.MergeResources(results...)
104104

105105
// Merge all results into a single result
106-
upsert, toDel := azure_sync.ReconcileResults(currentTAGResources, result)
106+
upsert, toDel := azuresync.ReconcileResults(currentTAGResources, result)
107107
pushErr := azurePush(stream, upsert, toDel)
108108

109109
if pushErr != nil {
@@ -191,8 +191,8 @@ func azurePush(
191191
}
192192

193193
// getAllTAGSyncAzureFetchers returns both static and dynamic TAG Azure fetchers
194-
func (s *Server) getAllTAGSyncAzureFetchers() []*azure_sync.Fetcher {
195-
allFetchers := make([]*azure_sync.Fetcher, 0, len(s.dynamicTAGAzureFetchers))
194+
func (s *Server) getAllTAGSyncAzureFetchers() []*azuresync.Fetcher {
195+
allFetchers := make([]*azuresync.Fetcher, 0, len(s.dynamicTAGAzureFetchers))
196196

197197
s.muDynamicTAGAzureFetchers.RLock()
198198
for _, fetcherSet := range s.dynamicTAGAzureFetchers {
@@ -291,7 +291,7 @@ func (s *Server) initializeAndWatchAzureAccessGraph(ctx context.Context, reloadC
291291
if len(supportedKinds) == 0 {
292292
return trace.BadParameter("TAG Azure service did not return supported kinds")
293293
}
294-
features := azure_sync.BuildFeatures(supportedKinds...)
294+
features := azuresync.BuildFeatures(supportedKinds...)
295295

296296
// Cancels the context to stop the event watcher if the access graph connection fails
297297
var wg sync.WaitGroup
@@ -320,7 +320,7 @@ func (s *Server) initializeAndWatchAzureAccessGraph(ctx context.Context, reloadC
320320
s.Log.InfoContext(ctx, "Access graph Azure service poll interval", "poll_interval", tickerInterval)
321321

322322
// Reconciles the resources as they're imported from Azure
323-
azureResources := &azure_sync.Resources{}
323+
azureResources := &azuresync.Resources{}
324324
ticker := time.NewTicker(15 * time.Minute)
325325
defer ticker.Stop()
326326
for {
@@ -386,20 +386,20 @@ func (s *Server) initTAGAzureWatchers(ctx context.Context, cfg *Config) error {
386386

387387
// accessGraphAzureFetchersFromMatchers converts matcher configuration to fetchers for Azure resource synchronization
388388
func (s *Server) accessGraphAzureFetchersFromMatchers(
389-
matchers Matchers, discoveryConfigName string) ([]*azure_sync.Fetcher, error) {
390-
var fetchers []*azure_sync.Fetcher
389+
matchers Matchers, discoveryConfigName string) ([]*azuresync.Fetcher, error) {
390+
var fetchers []*azuresync.Fetcher
391391
var errs []error
392392
if matchers.AccessGraph == nil {
393393
return fetchers, nil
394394
}
395395
for _, matcher := range matchers.AccessGraph.Azure {
396-
fetcherCfg := azure_sync.Config{
396+
fetcherCfg := azuresync.Config{
397397
CloudClients: s.CloudClients,
398398
SubscriptionID: matcher.SubscriptionID,
399399
Integration: matcher.Integration,
400400
DiscoveryConfigName: discoveryConfigName,
401401
}
402-
fetcher, err := azure_sync.NewFetcher(fetcherCfg, s.ctx)
402+
fetcher, err := azuresync.NewFetcher(fetcherCfg, s.ctx)
403403
if err != nil {
404404
errs = append(errs, err)
405405
continue

0 commit comments

Comments
 (0)