* fix: minor log typo

* fix: #2895 no need to specify listen port in config file, just use system random

* drop useless code
This commit is contained in:
Morya
2024-12-04 11:18:39 +08:00
committed by GitHub
parent 14477321fd
commit a69d174e86
22 changed files with 198 additions and 67 deletions
+3 -5
View File
@@ -46,8 +46,7 @@ func (s *Server) InitServer(ctx context.Context, config *Config, disCov discover
func (s *Server) Start(ctx context.Context, index int, conf *Config) error {
return startrpc.Start(ctx, &conf.Discovery, &conf.MsgGateway.Prometheus, conf.MsgGateway.ListenIP,
conf.MsgGateway.RPC.RegisterIP,
conf.MsgGateway.RPC.Ports, index,
index,
conf.Share.RpcRegisterName.MessageGateway,
&conf.Share,
conf,
@@ -57,7 +56,7 @@ func (s *Server) Start(ctx context.Context, index int, conf *Config) error {
type Server struct {
msggateway.UnimplementedMsgGatewayServer
rpcPort int
LongConnServer LongConnServer
config *Config
pushTerminal map[int]struct{}
@@ -70,9 +69,8 @@ func (s *Server) SetLongConnServer(LongConnServer LongConnServer) {
s.LongConnServer = LongConnServer
}
func NewServer(rpcPort int, longConnServer LongConnServer, conf *Config, ready func(srv *Server) error) *Server {
func NewServer(longConnServer LongConnServer, conf *Config, ready func(srv *Server) error) *Server {
s := &Server{
rpcPort: rpcPort,
LongConnServer: longConnServer,
pushTerminal: make(map[int]struct{}),
config: conf,