change package of proto and method name of service

to comply with tonic, grpc implementation in rust
This commit is contained in:
2023-04-28 00:20:36 +08:00
parent f235fb3680
commit b47e40d794
6 changed files with 99 additions and 94 deletions

View File

@ -46,7 +46,7 @@ func New(options Options) (*SignalingServer, error) {
}, nil
}
func (signalingServer SignalingServer) handleStream(ctx context.Context, errGroup *errgroup.Group, stream proto.Signaling_ConnectServer) func() error {
func (signalingServer SignalingServer) handleStream(ctx context.Context, errGroup *errgroup.Group, stream proto.Signaling_BiuServer) func() error {
return func() error {
for {
msg, err := stream.Recv()
@ -99,7 +99,7 @@ func (signalingServer SignalingServer) handleStream(ctx context.Context, errGrou
}
}
func (signalingServer SignalingServer) handleRedisPubSub(ctx context.Context, name, room string, stream proto.Signaling_ConnectServer) func() error {
func (signalingServer SignalingServer) handleRedisPubSub(ctx context.Context, name, room string, stream proto.Signaling_BiuServer) func() error {
return func() error {
pubsub := signalingServer.redis.Subscribe(ctx,
signalingServer.redisKeyPrefix+":"+room+":discover",
@ -180,7 +180,7 @@ func (signalingServer SignalingServer) handleRedisPubSub(ctx context.Context, na
}
}
func (signalingServer SignalingServer) Connect(stream proto.Signaling_ConnectServer) error {
func (signalingServer SignalingServer) Connect(stream proto.Signaling_BiuServer) error {
ctx, cancel := context.WithCancel(stream.Context())
defer cancel()