| 1 |
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. |
| 2 |
// versions: |
| 3 |
// - protoc-gen-go-grpc v1.3.0 |
| 4 |
// - protoc v5.29.1 |
| 5 |
// source: envoy/service/rate_limit_quota/v3/rlqs.proto |
| 6 |
|
| 7 |
package rate_limit_quotav3 |
| 8 |
|
| 9 |
import ( |
| 10 |
context "context" |
| 11 |
grpc "google.golang.org/grpc" |
| 12 |
codes "google.golang.org/grpc/codes" |
| 13 |
status "google.golang.org/grpc/status" |
| 14 |
) |
| 15 |
|
| 16 |
// This is a compile-time assertion to ensure that this generated file |
| 17 |
// is compatible with the grpc package it is being compiled against. |
| 18 |
// Requires gRPC-Go v1.32.0 or later. |
| 19 |
const _ = grpc.SupportPackageIsVersion7 |
| 20 |
|
| 21 |
const ( |
| 22 |
RateLimitQuotaService_StreamRateLimitQuotas_FullMethodName = "/envoy.service.rate_limit_quota.v3.RateLimitQuotaService/StreamRateLimitQuotas" |
| 23 |
) |
| 24 |
|
| 25 |
// RateLimitQuotaServiceClient is the client API for RateLimitQuotaService service. |
| 26 |
// |
| 27 |
// 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. |
| 28 |
type RateLimitQuotaServiceClient interface { |
| 29 |
// Main communication channel: the data plane sends usage reports to the RLQS server, |
| 30 |
// and the server asynchronously responding with the assignments. |
| 31 |
StreamRateLimitQuotas(ctx context.Context, opts ...grpc.CallOption) (RateLimitQuotaService_StreamRateLimitQuotasClient, error) |
| 32 |
} |
| 33 |
|
| 34 |
type rateLimitQuotaServiceClient struct { |
| 35 |
cc grpc.ClientConnInterface |
| 36 |
} |
| 37 |
|
| 38 |
func NewRateLimitQuotaServiceClient(cc grpc.ClientConnInterface) RateLimitQuotaServiceClient { |
| 39 |
return &rateLimitQuotaServiceClient{cc} |
| 40 |
} |
| 41 |
|
| 42 |
func (c *rateLimitQuotaServiceClient) StreamRateLimitQuotas(ctx context.Context, opts ...grpc.CallOption) (RateLimitQuotaService_StreamRateLimitQuotasClient, error) { |
| 43 |
stream, err := c.cc.NewStream(ctx, &RateLimitQuotaService_ServiceDesc.Streams[0], RateLimitQuotaService_StreamRateLimitQuotas_FullMethodName, opts...) |
| 44 |
if err != nil { |
| 45 |
return nil, err |
| 46 |
} |
| 47 |
x := &rateLimitQuotaServiceStreamRateLimitQuotasClient{stream} |
| 48 |
return x, nil |
| 49 |
} |
| 50 |
|
| 51 |
type RateLimitQuotaService_StreamRateLimitQuotasClient interface { |
| 52 |
Send(*RateLimitQuotaUsageReports) error |
| 53 |
Recv() (*RateLimitQuotaResponse, error) |
| 54 |
grpc.ClientStream |
| 55 |
} |
| 56 |
|
| 57 |
type rateLimitQuotaServiceStreamRateLimitQuotasClient struct { |
| 58 |
grpc.ClientStream |
| 59 |
} |
| 60 |
|
| 61 |
func (x *rateLimitQuotaServiceStreamRateLimitQuotasClient) Send(m *RateLimitQuotaUsageReports) error { |
| 62 |
return x.ClientStream.SendMsg(m) |
| 63 |
} |
| 64 |
|
| 65 |
func (x *rateLimitQuotaServiceStreamRateLimitQuotasClient) Recv() (*RateLimitQuotaResponse, error) { |
| 66 |
m := new(RateLimitQuotaResponse) |
| 67 |
if err := x.ClientStream.RecvMsg(m); err != nil { |
| 68 |
return nil, err |
| 69 |
} |
| 70 |
return m, nil |
| 71 |
} |
| 72 |
|
| 73 |
// RateLimitQuotaServiceServer is the server API for RateLimitQuotaService service. |
| 74 |
// All implementations should embed UnimplementedRateLimitQuotaServiceServer |
| 75 |
// for forward compatibility |
| 76 |
type RateLimitQuotaServiceServer interface { |
| 77 |
// Main communication channel: the data plane sends usage reports to the RLQS server, |
| 78 |
// and the server asynchronously responding with the assignments. |
| 79 |
StreamRateLimitQuotas(RateLimitQuotaService_StreamRateLimitQuotasServer) error |
| 80 |
} |
| 81 |
|
| 82 |
// UnimplementedRateLimitQuotaServiceServer should be embedded to have forward compatible implementations. |
| 83 |
type UnimplementedRateLimitQuotaServiceServer struct { |
| 84 |
} |
| 85 |
|
| 86 |
func (UnimplementedRateLimitQuotaServiceServer) StreamRateLimitQuotas(RateLimitQuotaService_StreamRateLimitQuotasServer) error { |
| 87 |
return status.Errorf(codes.Unimplemented, "method StreamRateLimitQuotas not implemented") |
| 88 |
} |
| 89 |
|
| 90 |
// UnsafeRateLimitQuotaServiceServer may be embedded to opt out of forward compatibility for this service. |
| 91 |
// Use of this interface is not recommended, as added methods to RateLimitQuotaServiceServer will |
| 92 |
// result in compilation errors. |
| 93 |
type UnsafeRateLimitQuotaServiceServer interface { |
| 94 |
mustEmbedUnimplementedRateLimitQuotaServiceServer() |
| 95 |
} |
| 96 |
|
| 97 |
func RegisterRateLimitQuotaServiceServer(s grpc.ServiceRegistrar, srv RateLimitQuotaServiceServer) { |
| 98 |
s.RegisterService(&RateLimitQuotaService_ServiceDesc, srv) |
| 99 |
} |
| 100 |
|
| 101 |
func _RateLimitQuotaService_StreamRateLimitQuotas_Handler(srv interface{}, stream grpc.ServerStream) error { |
| 102 |
return srv.(RateLimitQuotaServiceServer).StreamRateLimitQuotas(&rateLimitQuotaServiceStreamRateLimitQuotasServer{stream}) |
| 103 |
} |
| 104 |
|
| 105 |
type RateLimitQuotaService_StreamRateLimitQuotasServer interface { |
| 106 |
Send(*RateLimitQuotaResponse) error |
| 107 |
Recv() (*RateLimitQuotaUsageReports, error) |
| 108 |
grpc.ServerStream |
| 109 |
} |
| 110 |
|
| 111 |
type rateLimitQuotaServiceStreamRateLimitQuotasServer struct { |
| 112 |
grpc.ServerStream |
| 113 |
} |
| 114 |
|
| 115 |
func (x *rateLimitQuotaServiceStreamRateLimitQuotasServer) Send(m *RateLimitQuotaResponse) error { |
| 116 |
return x.ServerStream.SendMsg(m) |
| 117 |
} |
| 118 |
|
| 119 |
func (x *rateLimitQuotaServiceStreamRateLimitQuotasServer) Recv() (*RateLimitQuotaUsageReports, error) { |
| 120 |
m := new(RateLimitQuotaUsageReports) |
| 121 |
if err := x.ServerStream.RecvMsg(m); err != nil { |
| 122 |
return nil, err |
| 123 |
} |
| 124 |
return m, nil |
| 125 |
} |
| 126 |
|
| 127 |
// RateLimitQuotaService_ServiceDesc is the grpc.ServiceDesc for RateLimitQuotaService service. |
| 128 |
// It's only intended for direct use with grpc.RegisterService, |
| 129 |
// and not to be introspected or modified (even as a copy) |
| 130 |
var RateLimitQuotaService_ServiceDesc = grpc.ServiceDesc{ |
| 131 |
ServiceName: "envoy.service.rate_limit_quota.v3.RateLimitQuotaService", |
| 132 |
HandlerType: (*RateLimitQuotaServiceServer)(nil), |
| 133 |
Methods: []grpc.MethodDesc{}, |
| 134 |
Streams: []grpc.StreamDesc{ |
| 135 |
{ |
| 136 |
StreamName: "StreamRateLimitQuotas", |
| 137 |
Handler: _RateLimitQuotaService_StreamRateLimitQuotas_Handler, |
| 138 |
ServerStreams: true, |
| 139 |
ClientStreams: true, |
| 140 |
}, |
| 141 |
}, |
| 142 |
Metadata: "envoy/service/rate_limit_quota/v3/rlqs.proto", |
| 143 |
} |