mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
rtc
This commit is contained in:
parent
972675d4da
commit
1d3f05c22b
27
cmd/rpc/open_im_rtc/main.go
Normal file
27
cmd/rpc/open_im_rtc/main.go
Normal file
@ -0,0 +1,27 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"Open_IM/internal/rpc/rtc"
|
||||
"Open_IM/pkg/common/log"
|
||||
rtcPb "Open_IM/pkg/proto/rtc"
|
||||
"Open_IM/pkg/utils"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/reflection"
|
||||
"net"
|
||||
)
|
||||
|
||||
func main() {
|
||||
lis, err := net.Listen("tcp", "0.0.0.0:11300")
|
||||
if err != nil {
|
||||
log.NewError("", utils.GetSelfFuncName(), err.Error())
|
||||
} // 创建 RPC 服务容器
|
||||
grpcServer := grpc.NewServer()
|
||||
rtcPb.RegisterRtcServiceServer(grpcServer, &rtc.RtcService{})
|
||||
|
||||
reflection.Register(grpcServer)
|
||||
|
||||
if err := grpcServer.Serve(lis); err != nil {
|
||||
log.NewError("", utils.GetSelfFuncName(), err.Error())
|
||||
}
|
||||
log.NewInfo("", utils.GetSelfFuncName(), "start success")
|
||||
}
|
1
go.mod
1
go.mod
@ -32,6 +32,7 @@ require (
|
||||
github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible
|
||||
github.com/lestrrat-go/strftime v1.0.4 // indirect
|
||||
github.com/lib/pq v1.2.0 // indirect
|
||||
github.com/livekit/protocol v0.11.14-0.20220223195254-d8c251e13231 // indirect
|
||||
github.com/livekit/server-sdk-go v0.9.1
|
||||
github.com/mattn/go-sqlite3 v1.14.6 // indirect
|
||||
github.com/minio/minio-go/v7 v7.0.22
|
||||
|
Loading…
x
Reference in New Issue
Block a user