1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-05-26 22:09:07 -04:00

replace TypedMessage with anypb.Any

This commit is contained in:
Shelikhoo
2021-06-19 14:36:54 +01:00
parent add375390e
commit ba2dd5995d
65 changed files with 721 additions and 859 deletions

View File

@@ -2,6 +2,7 @@ package command
import (
"context"
"github.com/v2fly/v2ray-core/v4/common/serial"
grpc "google.golang.org/grpc"
@@ -81,7 +82,7 @@ func (s *handlerServer) RemoveInbound(ctx context.Context, request *RemoveInboun
}
func (s *handlerServer) AlterInbound(ctx context.Context, request *AlterInboundRequest) (*AlterInboundResponse, error) {
rawOperation, err := request.Operation.GetInstance()
rawOperation, err := serial.GetInstanceOf(request.Operation)
if err != nil {
return nil, newError("unknown operation").Base(err)
}
@@ -110,7 +111,7 @@ func (s *handlerServer) RemoveOutbound(ctx context.Context, request *RemoveOutbo
}
func (s *handlerServer) AlterOutbound(ctx context.Context, request *AlterOutboundRequest) (*AlterOutboundResponse, error) {
rawOperation, err := request.Operation.GetInstance()
rawOperation, err := serial.GetInstanceOf(request.Operation)
if err != nil {
return nil, newError("unknown operation").Base(err)
}