package main import ( rpcMessageCMS "Open_IM/internal/rpc/admin_cms" "Open_IM/pkg/common/config" promePkg "Open_IM/pkg/common/prometheus" "flag" "fmt" ) func main() { defaultPorts := config.Config.RpcPort.OpenImAdminCmsPort rpcPort := flag.Int("port", defaultPorts[0], "rpc listening port") prometheusPort := flag.Int("prometheus_port", config.Config.Prometheus.AdminCmsPrometheusPort[0], "adminCMSPrometheusPort default listen port") flag.Parse() fmt.Println("start cms rpc server, port: ", *rpcPort, "\n") rpcServer := rpcMessageCMS.NewAdminCMSServer(*rpcPort) go func() { err := promePkg.StartPromeSrv(*prometheusPort) if err != nil { panic(err) } }() rpcServer.Run() }