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

Method getCodeDeployDeploymentsPerRegion

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

Source from the content-addressed store, hash-verified

2730}
2731
2732func (m *Inventory2Module) getCodeDeployDeploymentsPerRegion(r string, wg *sync.WaitGroup, semaphore chan struct{}) {
2733 defer func() {
2734 wg.Done()
2735 m.CommandCounter.DecrExecuting()
2736 m.CommandCounter.IncrComplete()
2737 }()
2738 semaphore <- struct{}{}
2739 defer func() {
2740 <-semaphore
2741 }()
2742 // m.CommandCounter.IncrTotal()
2743 m.CommandCounter.DecrPending()
2744 m.CommandCounter.IncrExecuting()
2745 var totalCountThisServiceThisRegion = 0
2746 var service = "CodeDeploy Deployments"
2747 var resourceNames []string
2748
2749 deployments, err := sdk.CachedCodeDeployListDeployments(m.CodeDeployClient, aws.ToString(m.Caller.Account), r)
2750 if err != nil {
2751 m.modLog.Error(err.Error())
2752 m.CommandCounter.IncrError()
2753 return
2754
2755 }
2756
2757 // Add this page of resources to the total count
2758 totalCountThisServiceThisRegion = totalCountThisServiceThisRegion + len(deployments)
2759
2760 // Add this page of resources to the module's resource list
2761 for _, d := range deployments {
2762 arn := "arn:aws:codedeploy:" + r + ":" + aws.ToString(m.Caller.Account) + ":application:" + d
2763 resourceNames = append(resourceNames, arn)
2764 }
2765
2766 m.mu.Lock()
2767 m.resources = append(m.resources, resourceNames...)
2768 m.serviceMap[service][r] = totalCountThisServiceThisRegion
2769 m.totalRegionCounts[r] = m.totalRegionCounts[r] + totalCountThisServiceThisRegion
2770 m.serviceMap["total"][r] = m.serviceMap["total"][r] + totalCountThisServiceThisRegion
2771 m.mu.Unlock()
2772}
2773
2774func (m *Inventory2Module) getDataPipelinePipelinesPerRegion(r string, wg *sync.WaitGroup, semaphore chan struct{}) {
2775 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