fetcher/utils/reassign_topics/main.go
2018-11-11 20:54:49 +03:00

37 lines
665 B
Go

package main
import (
"flag"
"gitea.difrex.ru/Umbrella/fetcher/i2es"
log "github.com/sirupsen/logrus"
)
var (
es, index, esType string
step int
)
func init() {
flag.StringVar(&es, "es", "http://127.0.0.1:9200", "Elasticsearch URL")
flag.StringVar(&index, "index", "idec", "Elasticsearch index")
flag.StringVar(&esType, "esType", "post", "Elasticsearch document type")
flag.IntVar(&step, "step", 100, "Scroll step")
flag.Parse()
}
func main() {
conf := Conf{
ES: i2es.ESConf{
Host: es,
Index: index,
Type: esType,
},
Step: step,
}
con := newContainer()
conf.reassignTopic(&con)
log.Infof("\n%+v\n", con.ToUpdate)
}