You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Open-IM-Server/cmd/msgtransfer/main.go

25 lines
572 B

package main
import (
2 years ago
"OpenIM/internal/msgtransfer"
"OpenIM/pkg/common/config"
"OpenIM/pkg/common/constant"
"OpenIM/pkg/common/log"
2 years ago
"flag"
"sync"
)
func main() {
2 years ago
if err := config.InitConfig(""); err != nil {
2 years ago
panic(err.Error())
}
var wg sync.WaitGroup
wg.Add(1)
2 years ago
prometheusPort := flag.Int("prometheus_port", config.Config.Prometheus.MessageTransferPrometheusPort[0], "MessageTransferPrometheusPort default listen port")
3 years ago
log.NewPrivateLog(constant.LogFileName)
2 years ago
if err := msgtransfer.StartTransfer(*prometheusPort); err != nil {
panic(err)
}
wg.Wait()
}