(r string, wg *sync.WaitGroup, semaphore chan struct{}, dataReceiver chan Endpoint)
| 696 | } |
| 697 | |
| 698 | func (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 | |
| 744 | func (m *EndpointsModule) getELBv2ListenersPerRegion(r string, wg *sync.WaitGroup, semaphore chan struct{}, dataReceiver chan Endpoint) { |
| 745 | defer func() { |
no test coverage detected