package main import ( "Open_IM/internal/rpc/msg" "Open_IM/pkg/common/config" "Open_IM/pkg/common/constant" promePkg "Open_IM/pkg/common/prometheus" "flag" "fmt" ) func main() { defaultPorts := config.Config.RpcPort.OpenImMessagePort rpcPort := flag.Int("port", defaultPorts[0], "rpc listening port") prometheusPort := flag.Int("prometheus_port", config.Config.Prometheus.MessagePrometheusPort[0], "msgPrometheusPort default listen port") flag.Parse() fmt.Println("start msg rpc server, port: ", *rpcPort, "OpenIM version: ", constant.CurrentVersion, "\n") rpcServer := msg.NewRpcChatServer(*rpcPort) go func() { err := promePkg.StartPromeSrv(*prometheusPort) if err != nil { panic(err) } }() rpcServer.Run() }