MCPcopy Index your code
hub / github.com/BishopFox/cloudfox / getCodeDeployApplicationsPerRegion

Method getCodeDeployApplicationsPerRegion

aws/inventory.go:2690–2730  ·  view source on GitHub ↗
(r string, wg *sync.WaitGroup, semaphore chan struct{})

Source from the content-addressed store, hash-verified

2688}
2689
2690func (m *Inventory2Module) getCodeDeployApplicationsPerRegion(r string, wg *sync.WaitGroup, semaphore chan struct{}) {
2691 defer func() {
2692 wg.Done()
2693 m.CommandCounter.DecrExecuting()
2694 m.CommandCounter.IncrComplete()
2695 }()
2696 semaphore <- struct{}{}
2697 defer func() {
2698 <-semaphore
2699 }()
2700 // m.CommandCounter.IncrTotal()
2701 m.CommandCounter.DecrPending()
2702 m.CommandCounter.IncrExecuting()
2703 var totalCountThisServiceThisRegion = 0
2704 var service = "CodeDeploy Applications"
2705 var resourceNames []string
2706
2707 apps, err := sdk.CachedCodeDeployListApplications(m.CodeDeployClient, aws.ToString(m.Caller.Account), r)
2708 if err != nil {
2709 m.modLog.Error(err.Error())
2710 m.CommandCounter.IncrError()
2711 return
2712
2713 }
2714
2715 // Add this page of resources to the total count
2716 totalCountThisServiceThisRegion = totalCountThisServiceThisRegion + len(apps)
2717
2718 // Add this page of resources to the module's resource list
2719 for _, app := range apps {
2720 arn := "arn:aws:codedeploy:" + r + ":" + aws.ToString(m.Caller.Account) + ":application:" + app
2721 resourceNames = append(resourceNames, arn)
2722 }
2723
2724 m.mu.Lock()
2725 m.resources = append(m.resources, resourceNames...)
2726 m.serviceMap[service][r] = totalCountThisServiceThisRegion
2727 m.totalRegionCounts[r] = m.totalRegionCounts[r] + totalCountThisServiceThisRegion
2728 m.serviceMap["total"][r] = m.serviceMap["total"][r] + totalCountThisServiceThisRegion
2729 m.mu.Unlock()
2730}
2731
2732func (m *Inventory2Module) getCodeDeployDeploymentsPerRegion(r string, wg *sync.WaitGroup, semaphore chan struct{}) {
2733 defer func() {

Callers 1

executeChecksMethod · 0.95

Calls 7

DecrExecutingMethod · 0.80
IncrCompleteMethod · 0.80
DecrPendingMethod · 0.80
IncrExecutingMethod · 0.80
ErrorMethod · 0.80
IncrErrorMethod · 0.80

Tested by

no test coverage detected