Skip to content

Commit

Permalink
Use constant
Browse files Browse the repository at this point in the history
  • Loading branch information
mihirsoni committed Jul 26, 2019
1 parent 457b09e commit 9a3e779
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions destination/destinations.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

//FileName where destinations are stored and read from
const FileName = "destinations.yaml"
const indexName = ".opendistro-alerting-config"
const indexSearchURL = "/.opendistro-alerting-config/_search"

//GetLocal Parse local destinations
func GetLocal(rootDir string) (map[string]string, error) {
Expand Down Expand Up @@ -45,7 +45,7 @@ func GetRemote(esClient es.Client) (map[string]string, error) {
// Adding 10k which will not be the case.
getAllDestinationQuery := []byte(`{"size": 10000, "query":{ "bool": {"must": { "exists": { "field" : "destination" }}}}}`)
resp, err := esClient.MakeRequest(http.MethodPost,
"/.opendistro-alerting-config/_search",
indexSearchURL,
getAllDestinationQuery,
getCommonHeaders(),
)
Expand Down

0 comments on commit 9a3e779

Please sign in to comment.