(r string, wg *sync.WaitGroup, semaphore chan struct{}, dataReceiver chan Workload)
| 423 | } |
| 424 | |
| 425 | func (m *WorkloadsModule) getLambdaWorkloadsPerRegion(r string, wg *sync.WaitGroup, semaphore chan struct{}, dataReceiver chan Workload) { |
| 426 | defer func() { |
| 427 | m.CommandCounter.DecrExecuting() |
| 428 | m.CommandCounter.IncrComplete() |
| 429 | wg.Done() |
| 430 | |
| 431 | }() |
| 432 | semaphore <- struct{}{} |
| 433 | defer func() { |
| 434 | <-semaphore |
| 435 | }() |
| 436 | |
| 437 | // Get Lambda functions |
| 438 | lambdaFunctions, err := sdk.CachedLambdaListFunctions(m.LambdaClient, aws.ToString(m.Caller.Account), r) |
| 439 | if err != nil { |
| 440 | m.modLog.Error(err) |
| 441 | } |
| 442 | for _, function := range lambdaFunctions { |
| 443 | //var role string |
| 444 | // if function.Role != nil { |
| 445 | // role = aws.ToString(function.Role) |
| 446 | // } |
| 447 | dataReceiver <- Workload{ |
| 448 | AWSService: "Lambda", |
| 449 | Region: r, |
| 450 | Type: "function", |
| 451 | Name: aws.ToString(function.FunctionName), |
| 452 | Arn: aws.ToString(function.FunctionArn), |
| 453 | Role: aws.ToString(function.Role), |
| 454 | } |
| 455 | } |
| 456 | } |
| 457 | |
| 458 | func (m *WorkloadsModule) getAppRunnerWorkloadsPerRegion(r string, wg *sync.WaitGroup, semaphore chan struct{}, dataReceiver chan Workload) { |
| 459 | defer func() { |
no test coverage detected