2020-10-15 21:31:50 +08:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"flag"
|
|
|
|
"fmt"
|
2020-11-04 16:28:14 +08:00
|
|
|
"strconv"
|
|
|
|
|
2020-10-19 18:31:00 +08:00
|
|
|
"github.com/zilliztech/milvus-distributed/internal/conf"
|
|
|
|
"github.com/zilliztech/milvus-distributed/internal/reader"
|
2020-10-15 21:31:50 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
ctx, _ := context.WithCancel(context.Background())
|
|
|
|
|
2020-11-03 14:53:36 +08:00
|
|
|
var yamlFile string
|
2020-10-15 21:31:50 +08:00
|
|
|
flag.StringVar(&yamlFile, "yaml", "", "yaml file")
|
|
|
|
flag.Parse()
|
|
|
|
// flag.Usage()
|
|
|
|
fmt.Println("yaml file: ", yamlFile)
|
|
|
|
conf.LoadConfig(yamlFile)
|
|
|
|
|
|
|
|
pulsarAddr := "pulsar://"
|
|
|
|
pulsarAddr += conf.Config.Pulsar.Address
|
|
|
|
pulsarAddr += ":"
|
|
|
|
pulsarAddr += strconv.FormatInt(int64(conf.Config.Pulsar.Port), 10)
|
|
|
|
reader.StartQueryNode(ctx, pulsarAddr)
|
|
|
|
}
|