MCPcopy Create free account
hub / github.com/BishopFox/cloudfox / getGrafanaEndPointsPerRegion

Method getGrafanaEndPointsPerRegion

aws/endpoints.go:698–742  ·  view source on GitHub ↗
(r string, wg *sync.WaitGroup, semaphore chan struct{}, dataReceiver chan Endpoint)

Source from the content-addressed store, hash-verified

696}
697
698func (m *EndpointsModule) getGrafanaEndPointsPerRegion(r string, wg *sync.WaitGroup, semaphore chan struct{}, dataReceiver chan Endpoint) {
699 defer func() {
700 m.CommandCounter.DecrExecuting()
701 m.CommandCounter.IncrComplete()
702 wg.Done()
703
704 }()
705 semaphore <- struct{}{}
706 defer func() {
707 <-semaphore
708 }()
709 // m.CommandCounter.IncrTotal()
710 m.CommandCounter.DecrPending()
711 m.CommandCounter.IncrExecuting()
712
713 ListWorkspaces, err := sdk.CachedGrafanaListWorkspaces(m.GrafanaClient, aws.ToString(m.Caller.Account), r)
714 if err != nil {
715 m.modLog.Error(err.Error())
716 m.CommandCounter.IncrError()
717 return
718 }
719
720 var public string
721 for _, workspace := range ListWorkspaces {
722 name := aws.ToString(workspace.Name)
723 endpoint := aws.ToString(workspace.Endpoint)
724 awsService := "Grafana"
725
726 public = "Unknown"
727 protocol := "https"
728 var port int32 = 443
729
730 dataReceiver <- Endpoint{
731 AWSService: awsService,
732 Region: r,
733 Name: name,
734 Endpoint: endpoint,
735 Port: port,
736 Protocol: protocol,
737 Public: public,
738 }
739
740 }
741
742}
743
744func (m *EndpointsModule) getELBv2ListenersPerRegion(r string, wg *sync.WaitGroup, semaphore chan struct{}, dataReceiver chan Endpoint) {
745 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