Skip to content

Commit

Permalink
gofumpt
Browse files Browse the repository at this point in the history
Signed-off-by: liguozhong <[email protected]>

Signed-off-by: fuling <[email protected]>
  • Loading branch information
liguozhong committed Oct 19, 2023
1 parent aa6a99d commit ce5728f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions notifier/notifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,7 @@ func (a alertmanagerLabels) url() *url.URL {
Path: a.labels.Get(pathLabel),
}
}

func NewTarget(labels labels.Labels, discoveredLabels labels.Labels) Target {
return Target{labels, discoveredLabels}
}
Expand Down
1 change: 1 addition & 0 deletions web/api/v1/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -1176,6 +1176,7 @@ func renderTargetData(targets map[string][]TargetServiceDiscovery) TargetDiscove
}
return res
}

func (api *API) servicediscovery(r *http.Request) apiFuncResult {
scrapeTargets := api.targetRetriever(r.Context()).TargetsAll()
scrapeTargetDiscoverys := make(map[string][]TargetServiceDiscovery)
Expand Down
3 changes: 2 additions & 1 deletion web/api/v1/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1611,7 +1611,8 @@ func testEndpoints(t *testing.T, api *API, tr *testTargetRetriever, es storage.E
Labels: map[string]string{
"instance": "http://http:%2F%2Falertmanager.example.com:8080/api/v1/alerts",
},
}},
},
},
DroppedTargets: []*DroppedTarget{
{
DiscoveredLabels: map[string]string{
Expand Down

0 comments on commit ce5728f

Please sign in to comment.