(region string, wg *sync.WaitGroup, semaphore chan struct{}, dataReceiver chan EnvironmentVariable)
| 424 | } |
| 425 | |
| 426 | func (m *EnvsModule) getLambdaEnvironmentVariablesPerRegion(region string, wg *sync.WaitGroup, semaphore chan struct{}, dataReceiver chan EnvironmentVariable) { |
| 427 | defer func() { |
| 428 | m.CommandCounter.DecrExecuting() |
| 429 | m.CommandCounter.IncrComplete() |
| 430 | wg.Done() |
| 431 | |
| 432 | }() |
| 433 | semaphore <- struct{}{} |
| 434 | defer func() { |
| 435 | <-semaphore |
| 436 | }() |
| 437 | // m.CommandCounter.IncrTotal() |
| 438 | m.CommandCounter.DecrPending() |
| 439 | m.CommandCounter.IncrExecuting() |
| 440 | |
| 441 | Functions, err := sdk.CachedLambdaListFunctions(m.LambdaClient, aws.ToString(m.Caller.Account), region) |
| 442 | if err != nil { |
| 443 | m.modLog.Error(err.Error()) |
| 444 | m.CommandCounter.IncrError() |
| 445 | return |
| 446 | } |
| 447 | |
| 448 | for _, function := range Functions { |
| 449 | m.getLambdaEnvironmentVariablesPerFunction(function, region, dataReceiver) |
| 450 | } |
| 451 | |
| 452 | } |
| 453 | |
| 454 | func (m *EnvsModule) getLambdaEnvironmentVariablesPerFunction(function lambdaTypes.FunctionConfiguration, region string, dataReceiver chan EnvironmentVariable) { |
| 455 | if function.Environment != nil { |
no test coverage detected