1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-22 01:57:12 -05:00

Refine proto.go due to protoc-gen-go-grpc update (#257)

* Refine: remove protoc-gen-go-grpc specific version
* pb.go: regenerate due to proto.go refresh
This commit is contained in:
Loyalsoldier 2020-10-04 05:43:26 +08:00 committed by GitHub
parent 36f0b7d6e4
commit 088ce4ed95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 49 additions and 21 deletions

View File

@ -11,7 +11,7 @@ import (
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6 const _ = grpc.SupportPackageIsVersion7
// LoggerServiceClient is the client API for LoggerService service. // LoggerServiceClient is the client API for LoggerService service.
// //
@ -49,10 +49,17 @@ type LoggerServiceServer interface {
type UnimplementedLoggerServiceServer struct { type UnimplementedLoggerServiceServer struct {
} }
func (*UnimplementedLoggerServiceServer) RestartLogger(context.Context, *RestartLoggerRequest) (*RestartLoggerResponse, error) { func (UnimplementedLoggerServiceServer) RestartLogger(context.Context, *RestartLoggerRequest) (*RestartLoggerResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RestartLogger not implemented") return nil, status.Errorf(codes.Unimplemented, "method RestartLogger not implemented")
} }
func (*UnimplementedLoggerServiceServer) mustEmbedUnimplementedLoggerServiceServer() {} func (UnimplementedLoggerServiceServer) mustEmbedUnimplementedLoggerServiceServer() {}
// UnsafeLoggerServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to LoggerServiceServer will
// result in compilation errors.
type UnsafeLoggerServiceServer interface {
mustEmbedUnimplementedLoggerServiceServer()
}
func RegisterLoggerServiceServer(s *grpc.Server, srv LoggerServiceServer) { func RegisterLoggerServiceServer(s *grpc.Server, srv LoggerServiceServer) {
s.RegisterService(&_LoggerService_serviceDesc, srv) s.RegisterService(&_LoggerService_serviceDesc, srv)

View File

@ -11,7 +11,7 @@ import (
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6 const _ = grpc.SupportPackageIsVersion7
// HandlerServiceClient is the client API for HandlerService service. // HandlerServiceClient is the client API for HandlerService service.
// //
@ -104,25 +104,32 @@ type HandlerServiceServer interface {
type UnimplementedHandlerServiceServer struct { type UnimplementedHandlerServiceServer struct {
} }
func (*UnimplementedHandlerServiceServer) AddInbound(context.Context, *AddInboundRequest) (*AddInboundResponse, error) { func (UnimplementedHandlerServiceServer) AddInbound(context.Context, *AddInboundRequest) (*AddInboundResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AddInbound not implemented") return nil, status.Errorf(codes.Unimplemented, "method AddInbound not implemented")
} }
func (*UnimplementedHandlerServiceServer) RemoveInbound(context.Context, *RemoveInboundRequest) (*RemoveInboundResponse, error) { func (UnimplementedHandlerServiceServer) RemoveInbound(context.Context, *RemoveInboundRequest) (*RemoveInboundResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RemoveInbound not implemented") return nil, status.Errorf(codes.Unimplemented, "method RemoveInbound not implemented")
} }
func (*UnimplementedHandlerServiceServer) AlterInbound(context.Context, *AlterInboundRequest) (*AlterInboundResponse, error) { func (UnimplementedHandlerServiceServer) AlterInbound(context.Context, *AlterInboundRequest) (*AlterInboundResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AlterInbound not implemented") return nil, status.Errorf(codes.Unimplemented, "method AlterInbound not implemented")
} }
func (*UnimplementedHandlerServiceServer) AddOutbound(context.Context, *AddOutboundRequest) (*AddOutboundResponse, error) { func (UnimplementedHandlerServiceServer) AddOutbound(context.Context, *AddOutboundRequest) (*AddOutboundResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AddOutbound not implemented") return nil, status.Errorf(codes.Unimplemented, "method AddOutbound not implemented")
} }
func (*UnimplementedHandlerServiceServer) RemoveOutbound(context.Context, *RemoveOutboundRequest) (*RemoveOutboundResponse, error) { func (UnimplementedHandlerServiceServer) RemoveOutbound(context.Context, *RemoveOutboundRequest) (*RemoveOutboundResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RemoveOutbound not implemented") return nil, status.Errorf(codes.Unimplemented, "method RemoveOutbound not implemented")
} }
func (*UnimplementedHandlerServiceServer) AlterOutbound(context.Context, *AlterOutboundRequest) (*AlterOutboundResponse, error) { func (UnimplementedHandlerServiceServer) AlterOutbound(context.Context, *AlterOutboundRequest) (*AlterOutboundResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AlterOutbound not implemented") return nil, status.Errorf(codes.Unimplemented, "method AlterOutbound not implemented")
} }
func (*UnimplementedHandlerServiceServer) mustEmbedUnimplementedHandlerServiceServer() {} func (UnimplementedHandlerServiceServer) mustEmbedUnimplementedHandlerServiceServer() {}
// UnsafeHandlerServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to HandlerServiceServer will
// result in compilation errors.
type UnsafeHandlerServiceServer interface {
mustEmbedUnimplementedHandlerServiceServer()
}
func RegisterHandlerServiceServer(s *grpc.Server, srv HandlerServiceServer) { func RegisterHandlerServiceServer(s *grpc.Server, srv HandlerServiceServer) {
s.RegisterService(&_HandlerService_serviceDesc, srv) s.RegisterService(&_HandlerService_serviceDesc, srv)

View File

@ -11,7 +11,7 @@ import (
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6 const _ = grpc.SupportPackageIsVersion7
// RoutingServiceClient is the client API for RoutingService service. // RoutingServiceClient is the client API for RoutingService service.
// //
@ -83,13 +83,20 @@ type RoutingServiceServer interface {
type UnimplementedRoutingServiceServer struct { type UnimplementedRoutingServiceServer struct {
} }
func (*UnimplementedRoutingServiceServer) SubscribeRoutingStats(*SubscribeRoutingStatsRequest, RoutingService_SubscribeRoutingStatsServer) error { func (UnimplementedRoutingServiceServer) SubscribeRoutingStats(*SubscribeRoutingStatsRequest, RoutingService_SubscribeRoutingStatsServer) error {
return status.Errorf(codes.Unimplemented, "method SubscribeRoutingStats not implemented") return status.Errorf(codes.Unimplemented, "method SubscribeRoutingStats not implemented")
} }
func (*UnimplementedRoutingServiceServer) TestRoute(context.Context, *TestRouteRequest) (*RoutingContext, error) { func (UnimplementedRoutingServiceServer) TestRoute(context.Context, *TestRouteRequest) (*RoutingContext, error) {
return nil, status.Errorf(codes.Unimplemented, "method TestRoute not implemented") return nil, status.Errorf(codes.Unimplemented, "method TestRoute not implemented")
} }
func (*UnimplementedRoutingServiceServer) mustEmbedUnimplementedRoutingServiceServer() {} func (UnimplementedRoutingServiceServer) mustEmbedUnimplementedRoutingServiceServer() {}
// UnsafeRoutingServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to RoutingServiceServer will
// result in compilation errors.
type UnsafeRoutingServiceServer interface {
mustEmbedUnimplementedRoutingServiceServer()
}
func RegisterRoutingServiceServer(s *grpc.Server, srv RoutingServiceServer) { func RegisterRoutingServiceServer(s *grpc.Server, srv RoutingServiceServer) {
s.RegisterService(&_RoutingService_serviceDesc, srv) s.RegisterService(&_RoutingService_serviceDesc, srv)

View File

@ -11,7 +11,7 @@ import (
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6 const _ = grpc.SupportPackageIsVersion7
// StatsServiceClient is the client API for StatsService service. // StatsServiceClient is the client API for StatsService service.
// //
@ -71,16 +71,23 @@ type StatsServiceServer interface {
type UnimplementedStatsServiceServer struct { type UnimplementedStatsServiceServer struct {
} }
func (*UnimplementedStatsServiceServer) GetStats(context.Context, *GetStatsRequest) (*GetStatsResponse, error) { func (UnimplementedStatsServiceServer) GetStats(context.Context, *GetStatsRequest) (*GetStatsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetStats not implemented") return nil, status.Errorf(codes.Unimplemented, "method GetStats not implemented")
} }
func (*UnimplementedStatsServiceServer) QueryStats(context.Context, *QueryStatsRequest) (*QueryStatsResponse, error) { func (UnimplementedStatsServiceServer) QueryStats(context.Context, *QueryStatsRequest) (*QueryStatsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method QueryStats not implemented") return nil, status.Errorf(codes.Unimplemented, "method QueryStats not implemented")
} }
func (*UnimplementedStatsServiceServer) GetSysStats(context.Context, *SysStatsRequest) (*SysStatsResponse, error) { func (UnimplementedStatsServiceServer) GetSysStats(context.Context, *SysStatsRequest) (*SysStatsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetSysStats not implemented") return nil, status.Errorf(codes.Unimplemented, "method GetSysStats not implemented")
} }
func (*UnimplementedStatsServiceServer) mustEmbedUnimplementedStatsServiceServer() {} func (UnimplementedStatsServiceServer) mustEmbedUnimplementedStatsServiceServer() {}
// UnsafeStatsServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to StatsServiceServer will
// result in compilation errors.
type UnsafeStatsServiceServer interface {
mustEmbedUnimplementedStatsServiceServer()
}
func RegisterStatsServiceServer(s *grpc.Server, srv StatsServiceServer) { func RegisterStatsServiceServer(s *grpc.Server, srv StatsServiceServer) {
s.RegisterService(&_StatsService_serviceDesc, srv) s.RegisterService(&_StatsService_serviceDesc, srv)

View File

@ -2,6 +2,6 @@ package core
//go:generate go install google.golang.org/protobuf/proto //go:generate go install google.golang.org/protobuf/proto
//go:generate go install google.golang.org/protobuf/cmd/protoc-gen-go //go:generate go install google.golang.org/protobuf/cmd/protoc-gen-go
//go:generate go get -v google.golang.org/grpc/cmd/protoc-gen-go-grpc@v0.0.0-20200825170228-39ef2aaf62df //go:generate go install google.golang.org/grpc/cmd/protoc-gen-go-grpc
//go:generate go install github.com/gogo/protobuf/protoc-gen-gofast //go:generate go install github.com/gogo/protobuf/protoc-gen-gofast
//go:generate go run v2ray.com/core/infra/vprotogen //go:generate go run v2ray.com/core/infra/vprotogen