@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1. 3.0
// - protoc-gen-go-grpc v1. 5.1
// - protoc v5.27.0
// source: app/router/command/command.proto
@ -15,8 +15,8 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1. 32 .0 or later.
const _ = grpc . SupportPackageIsVersion 7
// Requires gRPC-Go v1. 64 .0 or later.
const _ = grpc . SupportPackageIsVersion 9
const (
RoutingService_SubscribeRoutingStats_FullMethodName = "/xray.app.router.command.RoutingService/SubscribeRoutingStats"
@ -31,7 +31,7 @@ const (
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type RoutingServiceClient interface {
SubscribeRoutingStats ( ctx context . Context , in * SubscribeRoutingStatsRequest , opts ... grpc . CallOption ) ( RoutingService_SubscribeRoutingStatsClient , error )
SubscribeRoutingStats ( ctx context . Context , in * SubscribeRoutingStatsRequest , opts ... grpc . CallOption ) ( grpc. ServerStreamingClient [ RoutingContext ] , error )
TestRoute ( ctx context . Context , in * TestRouteRequest , opts ... grpc . CallOption ) ( * RoutingContext , error )
GetBalancerInfo ( ctx context . Context , in * GetBalancerInfoRequest , opts ... grpc . CallOption ) ( * GetBalancerInfoResponse , error )
OverrideBalancerTarget ( ctx context . Context , in * OverrideBalancerTargetRequest , opts ... grpc . CallOption ) ( * OverrideBalancerTargetResponse , error )
@ -47,12 +47,13 @@ func NewRoutingServiceClient(cc grpc.ClientConnInterface) RoutingServiceClient {
return & routingServiceClient { cc }
}
func ( c * routingServiceClient ) SubscribeRoutingStats ( ctx context . Context , in * SubscribeRoutingStatsRequest , opts ... grpc . CallOption ) ( RoutingService_SubscribeRoutingStatsClient , error ) {
stream , err := c . cc . NewStream ( ctx , & RoutingService_ServiceDesc . Streams [ 0 ] , RoutingService_SubscribeRoutingStats_FullMethodName , opts ... )
func ( c * routingServiceClient ) SubscribeRoutingStats ( ctx context . Context , in * SubscribeRoutingStatsRequest , opts ... grpc . CallOption ) ( grpc . ServerStreamingClient [ RoutingContext ] , error ) {
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
stream , err := c . cc . NewStream ( ctx , & RoutingService_ServiceDesc . Streams [ 0 ] , RoutingService_SubscribeRoutingStats_FullMethodName , cOpts ... )
if err != nil {
return nil , err
}
x := & routingServiceSubscribeRoutingStatsClient{ stream }
x := & grpc. GenericClientStream [ SubscribeRoutingStatsRequest , RoutingContext ] { ClientStream : stream }
if err := x . ClientStream . SendMsg ( in ) ; err != nil {
return nil , err
}
@ -62,26 +63,13 @@ func (c *routingServiceClient) SubscribeRoutingStats(ctx context.Context, in *Su
return x , nil
}
type RoutingService_SubscribeRoutingStatsClient interface {
Recv ( ) ( * RoutingContext , error )
grpc . ClientStream
}
type routingServiceSubscribeRoutingStatsClient struct {
grpc . ClientStream
}
func ( x * routingServiceSubscribeRoutingStatsClient ) Recv ( ) ( * RoutingContext , error ) {
m := new ( RoutingContext )
if err := x . ClientStream . RecvMsg ( m ) ; err != nil {
return nil , err
}
return m , nil
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type RoutingService_SubscribeRoutingStatsClient = grpc . ServerStreamingClient [ RoutingContext ]
func ( c * routingServiceClient ) TestRoute ( ctx context . Context , in * TestRouteRequest , opts ... grpc . CallOption ) ( * RoutingContext , error ) {
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( RoutingContext )
err := c . cc . Invoke ( ctx , RoutingService_TestRoute_FullMethodName , in , out , o pts... )
err := c . cc . Invoke ( ctx , RoutingService_TestRoute_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
@ -89,8 +77,9 @@ func (c *routingServiceClient) TestRoute(ctx context.Context, in *TestRouteReque
}
func ( c * routingServiceClient ) GetBalancerInfo ( ctx context . Context , in * GetBalancerInfoRequest , opts ... grpc . CallOption ) ( * GetBalancerInfoResponse , error ) {
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( GetBalancerInfoResponse )
err := c . cc . Invoke ( ctx , RoutingService_GetBalancerInfo_FullMethodName , in , out , o pts... )
err := c . cc . Invoke ( ctx , RoutingService_GetBalancerInfo_FullMethodName , in , out , cO pts... )
if err != nil {
return nil , err
}
@ -98,8 +87,9 @@ func (c *routingServiceClient) GetBalancerInfo(ctx context.Context, in *GetBalan
}
func ( c * routingServiceClient ) OverrideBalancerTarget ( ctx context . Context , in * OverrideBalancerTargetRequest , opts ... grpc . CallOption ) ( * OverrideBalancerTargetResponse , error ) {
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( OverrideBalancerTargetResponse )
err := c . cc . Invoke ( ctx , RoutingService_OverrideBalancerTarget_FullMethodName , in , out , o pts... )
err := c . cc . Invoke ( ctx , RoutingService_OverrideBalancerTarget_FullMethodName , in , out , cO pts... )
if err != nil {
return nil , err
}
@ -107,8 +97,9 @@ func (c *routingServiceClient) OverrideBalancerTarget(ctx context.Context, in *O
}
func ( c * routingServiceClient ) AddRule ( ctx context . Context , in * AddRuleRequest , opts ... grpc . CallOption ) ( * AddRuleResponse , error ) {
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( AddRuleResponse )
err := c . cc . Invoke ( ctx , RoutingService_AddRule_FullMethodName , in , out , o pts... )
err := c . cc . Invoke ( ctx , RoutingService_AddRule_FullMethodName , in , out , cO pts... )
if err != nil {
return nil , err
}
@ -116,8 +107,9 @@ func (c *routingServiceClient) AddRule(ctx context.Context, in *AddRuleRequest,
}
func ( c * routingServiceClient ) RemoveRule ( ctx context . Context , in * RemoveRuleRequest , opts ... grpc . CallOption ) ( * RemoveRuleResponse , error ) {
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( RemoveRuleResponse )
err := c . cc . Invoke ( ctx , RoutingService_RemoveRule_FullMethodName , in , out , o pts... )
err := c . cc . Invoke ( ctx , RoutingService_RemoveRule_FullMethodName , in , out , cO pts... )
if err != nil {
return nil , err
}
@ -126,9 +118,9 @@ func (c *routingServiceClient) RemoveRule(ctx context.Context, in *RemoveRuleReq
// RoutingServiceServer is the server API for RoutingService service.
// All implementations must embed UnimplementedRoutingServiceServer
// for forward compatibility
// for forward compatibility .
type RoutingServiceServer interface {
SubscribeRoutingStats ( * SubscribeRoutingStatsRequest , RoutingService_SubscribeRoutingStatsServer ) error
SubscribeRoutingStats ( * SubscribeRoutingStatsRequest , grpc. ServerStreamingServer [ RoutingContext ] ) error
TestRoute ( context . Context , * TestRouteRequest ) ( * RoutingContext , error )
GetBalancerInfo ( context . Context , * GetBalancerInfoRequest ) ( * GetBalancerInfoResponse , error )
OverrideBalancerTarget ( context . Context , * OverrideBalancerTargetRequest ) ( * OverrideBalancerTargetResponse , error )
@ -137,11 +129,14 @@ type RoutingServiceServer interface {
mustEmbedUnimplementedRoutingServiceServer ( )
}
// UnimplementedRoutingServiceServer must be embedded to have forward compatible implementations.
type UnimplementedRoutingServiceServer struct {
}
// UnimplementedRoutingServiceServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedRoutingServiceServer struct { }
func ( UnimplementedRoutingServiceServer ) SubscribeRoutingStats ( * SubscribeRoutingStatsRequest , RoutingService_SubscribeRoutingStatsServer ) error {
func ( UnimplementedRoutingServiceServer ) SubscribeRoutingStats ( * SubscribeRoutingStatsRequest , grpc. ServerStreamingServer [ RoutingContext ] ) error {
return status . Errorf ( codes . Unimplemented , "method SubscribeRoutingStats not implemented" )
}
func ( UnimplementedRoutingServiceServer ) TestRoute ( context . Context , * TestRouteRequest ) ( * RoutingContext , error ) {
@ -160,6 +155,7 @@ func (UnimplementedRoutingServiceServer) RemoveRule(context.Context, *RemoveRule
return nil , status . Errorf ( codes . Unimplemented , "method RemoveRule not implemented" )
}
func ( UnimplementedRoutingServiceServer ) mustEmbedUnimplementedRoutingServiceServer ( ) { }
func ( UnimplementedRoutingServiceServer ) testEmbeddedByValue ( ) { }
// 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
@ -169,6 +165,13 @@ type UnsafeRoutingServiceServer interface {
}
func RegisterRoutingServiceServer ( s grpc . ServiceRegistrar , srv RoutingServiceServer ) {
// If the following call pancis, it indicates UnimplementedRoutingServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t , ok := srv . ( interface { testEmbeddedByValue ( ) } ) ; ok {
t . testEmbeddedByValue ( )
}
s . RegisterService ( & RoutingService_ServiceDesc , srv )
}
@ -177,21 +180,11 @@ func _RoutingService_SubscribeRoutingStats_Handler(srv interface{}, stream grpc.
if err := stream . RecvMsg ( m ) ; err != nil {
return err
}
return srv . ( RoutingServiceServer ) . SubscribeRoutingStats ( m , & routingServiceSubscribeRoutingStatsServer { stream } )
}
type RoutingService_SubscribeRoutingStatsServer interface {
Send ( * RoutingContext ) error
grpc . ServerStream
return srv . ( RoutingServiceServer ) . SubscribeRoutingStats ( m , & grpc . GenericServerStream [ SubscribeRoutingStatsRequest , RoutingContext ] { ServerStream : stream } )
}
type routingServiceSubscribeRoutingStatsServer struct {
grpc . ServerStream
}
func ( x * routingServiceSubscribeRoutingStatsServer ) Send ( m * RoutingContext ) error {
return x . ServerStream . SendMsg ( m )
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type RoutingService_SubscribeRoutingStatsServer = grpc . ServerStreamingServer [ RoutingContext ]
func _RoutingService_TestRoute_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( TestRouteRequest )