-
Notifications
You must be signed in to change notification settings - Fork 683
/
rls.pb.go
125 lines (107 loc) · 4.97 KB
/
rls.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: envoy/service/ratelimit/v1/rls.proto
package ratelimit
import (
context "context"
fmt "fmt"
v2 "github.com/datawire/ambassador/pkg/api/envoy/service/ratelimit/v2"
proto "github.com/gogo/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
func init() {
proto.RegisterFile("envoy/service/ratelimit/v1/rls.proto", fileDescriptor_37d6df72c5a63247)
}
var fileDescriptor_37d6df72c5a63247 = []byte{
// 170 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x49, 0xcd, 0x2b, 0xcb,
0xaf, 0xd4, 0x2f, 0x4e, 0x2d, 0x2a, 0xcb, 0x4c, 0x4e, 0xd5, 0x2f, 0x4a, 0x2c, 0x49, 0xcd, 0xc9,
0xcc, 0xcd, 0x2c, 0xd1, 0x2f, 0x33, 0xd4, 0x2f, 0xca, 0x29, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9,
0x17, 0x12, 0x2c, 0x48, 0xd2, 0xcb, 0xa9, 0x4c, 0x2b, 0xd1, 0x83, 0xcb, 0x4b, 0xe1, 0xd6, 0x68,
0x84, 0xd0, 0x68, 0xd4, 0xc2, 0xc8, 0x25, 0x10, 0x94, 0x58, 0x92, 0xea, 0x03, 0x92, 0x0a, 0x86,
0xa8, 0x15, 0x2a, 0xe0, 0xe2, 0x0f, 0xce, 0xc8, 0x2f, 0xcd, 0x49, 0x81, 0xcb, 0x08, 0xe9, 0xe8,
0x81, 0x8d, 0xd3, 0x83, 0x1a, 0x87, 0xb0, 0x47, 0xaf, 0xcc, 0x48, 0x0f, 0xae, 0x2c, 0x28, 0xb5,
0xb0, 0x34, 0xb5, 0xb8, 0x44, 0x4a, 0x97, 0x48, 0xd5, 0xc5, 0x05, 0xf9, 0x79, 0xc5, 0xa9, 0x4a,
0x0c, 0x4e, 0x52, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0x63,
0x14, 0x27, 0x5c, 0x7d, 0x03, 0x23, 0x63, 0x12, 0x1b, 0xd8, 0xa5, 0xc6, 0x80, 0x00, 0x00, 0x00,
0xff, 0xff, 0x8a, 0xf7, 0xdb, 0xed, 0x0a, 0x01, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// RateLimitServiceClient is the client API for RateLimitService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type RateLimitServiceClient interface {
ShouldRateLimit(ctx context.Context, in *v2.RateLimitRequest, opts ...grpc.CallOption) (*v2.RateLimitResponse, error)
}
type rateLimitServiceClient struct {
cc *grpc.ClientConn
}
func NewRateLimitServiceClient(cc *grpc.ClientConn) RateLimitServiceClient {
return &rateLimitServiceClient{cc}
}
func (c *rateLimitServiceClient) ShouldRateLimit(ctx context.Context, in *v2.RateLimitRequest, opts ...grpc.CallOption) (*v2.RateLimitResponse, error) {
out := new(v2.RateLimitResponse)
err := c.cc.Invoke(ctx, "/pb.lyft.ratelimit.RateLimitService/ShouldRateLimit", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// RateLimitServiceServer is the server API for RateLimitService service.
type RateLimitServiceServer interface {
ShouldRateLimit(context.Context, *v2.RateLimitRequest) (*v2.RateLimitResponse, error)
}
// UnimplementedRateLimitServiceServer can be embedded to have forward compatible implementations.
type UnimplementedRateLimitServiceServer struct {
}
func (*UnimplementedRateLimitServiceServer) ShouldRateLimit(ctx context.Context, req *v2.RateLimitRequest) (*v2.RateLimitResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ShouldRateLimit not implemented")
}
func RegisterRateLimitServiceServer(s *grpc.Server, srv RateLimitServiceServer) {
s.RegisterService(&_RateLimitService_serviceDesc, srv)
}
func _RateLimitService_ShouldRateLimit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(v2.RateLimitRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RateLimitServiceServer).ShouldRateLimit(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.lyft.ratelimit.RateLimitService/ShouldRateLimit",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RateLimitServiceServer).ShouldRateLimit(ctx, req.(*v2.RateLimitRequest))
}
return interceptor(ctx, in, info, handler)
}
var _RateLimitService_serviceDesc = grpc.ServiceDesc{
ServiceName: "pb.lyft.ratelimit.RateLimitService",
HandlerType: (*RateLimitServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ShouldRateLimit",
Handler: _RateLimitService_ShouldRateLimit_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "envoy/service/ratelimit/v1/rls.proto",
}