lessmore/main.go

32 lines
657 B
Go
Raw Normal View History

2017-02-12 13:19:02 +03:00
package main
import (
"flag"
"gitea.difrex.ru/Umbrella/lessmore/node"
)
var (
listen string
es string
esMessagesIndex string
esMessagesType string
)
// init ...
func init() {
flag.StringVar(&listen, "listen", "127.0.0.1:15582", "Address to listen")
2017-02-13 10:24:21 +03:00
flag.StringVar(&es, "es", "http://127.0.0.1:9200", "ES host")
2017-02-12 13:19:02 +03:00
flag.StringVar(&esMessagesIndex, "esindex", "idec3", "ES index")
flag.StringVar(&esMessagesType, "estype", "post", "ES index type")
flag.Parse()
}
// main ...
func main() {
esconf := node.ESConf{}
esconf.Host = es
esconf.Index = esMessagesIndex
esconf.Type = esMessagesType
node.Serve(listen, esconf)
}