This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package esi | |
import ( | |
"context" | |
"github.com/olivere/elastic" | |
) | |
type BusinessLogic struct { | |
s Searcher |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"encoding/json" | |
"fmt" | |
"reflect" | |
"github.com/olivere/elastic" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"log" | |
"os" | |
elastic "gopkg.in/olivere/elastic.v5" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"log" | |
"os" | |
"github.com/olivere/elastic" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2012-present Oliver Eilhard. All rights reserved. | |
// Use of this source code is governed by a MIT-license. | |
// See http://olivere.mit-license.org/license.txt for details. | |
// List open and closed indices in Elasticsearch. | |
// | |
// Example | |
// | |
// | |
// list -url=http://127.0.0.1:9200 -sniff=false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"encoding/json" | |
"fmt" | |
"reflect" | |
"time" | |
elastic "gopkg.in/olivere/elastic.v5" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2012-present Oliver Eilhard. All rights reserved. | |
// Use of this source code is governed by a MIT-license. | |
// See http://olivere.mit-license.org/license.txt for details. | |
package main | |
import ( | |
"context" | |
"log" | |
"os" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"log" | |
"os" | |
"gopkg.in/olivere/elastic.v5" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2012-present Oliver Eilhard. All rights reserved. | |
// Use of this source code is governed by a MIT-license. | |
// See http://olivere.mit-license.org/license.txt for details. | |
package main | |
import ( | |
"fmt" | |
"log" | |
"os" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"errors" | |
"math/rand" | |
"sync/atomic" | |
) | |
// Balancer watches a list of Elasticsearch nodes and watches | |
// them as they get added or removed. It is also responsible | |
// for picking the next node to connect to for a request. | |
type Balancer interface { |