(r string, wg *sync.WaitGroup, semaphore chan struct{}, dataReceiver chan Workload)
| 456 | } |
| 457 | |
| 458 | func (m *WorkloadsModule) getAppRunnerWorkloadsPerRegion(r string, wg *sync.WaitGroup, semaphore chan struct{}, dataReceiver chan Workload) { |
| 459 | defer func() { |
| 460 | m.CommandCounter.DecrExecuting() |
| 461 | m.CommandCounter.IncrComplete() |
| 462 | wg.Done() |
| 463 | |
| 464 | }() |
| 465 | semaphore <- struct{}{} |
| 466 | defer func() { |
| 467 | <-semaphore |
| 468 | }() |
| 469 | |
| 470 | // Get App Runner services |
| 471 | appRunnerServices, err := sdk.CachedAppRunnerListServices(m.AppRunnerClient, aws.ToString(m.Caller.Account), r) |
| 472 | if err != nil { |
| 473 | m.modLog.Error(err) |
| 474 | } |
| 475 | for _, service := range appRunnerServices { |
| 476 | var role string |
| 477 | if service.ServiceArn != nil { |
| 478 | role = aws.ToString(service.ServiceArn) |
| 479 | } |
| 480 | dataReceiver <- Workload{ |
| 481 | AWSService: "App Runner", |
| 482 | Region: r, |
| 483 | Type: "service", |
| 484 | Name: aws.ToString(service.ServiceName), |
| 485 | Arn: aws.ToString(service.ServiceArn), |
| 486 | Role: role, |
| 487 | } |
| 488 | } |
| 489 | } |
| 490 | |
| 491 | func (m *WorkloadsModule) adminOnlyResults(headers []string, body [][]string) [][]string { |
| 492 | var adminOnlyBody [][]string |
no test coverage detected