1
2
3
4
5
6
7 package destination
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
17
18
19 const _ = grpc.SupportPackageIsVersion7
20
21 const (
22 Destination_Get_FullMethodName = "/io.linkerd.proxy.destination.Destination/Get"
23 Destination_GetProfile_FullMethodName = "/io.linkerd.proxy.destination.Destination/GetProfile"
24 )
25
26
27
28
29 type DestinationClient interface {
30
31
32 Get(ctx context.Context, in *GetDestination, opts ...grpc.CallOption) (Destination_GetClient, error)
33
34
35 GetProfile(ctx context.Context, in *GetDestination, opts ...grpc.CallOption) (Destination_GetProfileClient, error)
36 }
37
38 type destinationClient struct {
39 cc grpc.ClientConnInterface
40 }
41
42 func NewDestinationClient(cc grpc.ClientConnInterface) DestinationClient {
43 return &destinationClient{cc}
44 }
45
46 func (c *destinationClient) Get(ctx context.Context, in *GetDestination, opts ...grpc.CallOption) (Destination_GetClient, error) {
47 stream, err := c.cc.NewStream(ctx, &Destination_ServiceDesc.Streams[0], Destination_Get_FullMethodName, opts...)
48 if err != nil {
49 return nil, err
50 }
51 x := &destinationGetClient{stream}
52 if err := x.ClientStream.SendMsg(in); err != nil {
53 return nil, err
54 }
55 if err := x.ClientStream.CloseSend(); err != nil {
56 return nil, err
57 }
58 return x, nil
59 }
60
61 type Destination_GetClient interface {
62 Recv() (*Update, error)
63 grpc.ClientStream
64 }
65
66 type destinationGetClient struct {
67 grpc.ClientStream
68 }
69
70 func (x *destinationGetClient) Recv() (*Update, error) {
71 m := new(Update)
72 if err := x.ClientStream.RecvMsg(m); err != nil {
73 return nil, err
74 }
75 return m, nil
76 }
77
78 func (c *destinationClient) GetProfile(ctx context.Context, in *GetDestination, opts ...grpc.CallOption) (Destination_GetProfileClient, error) {
79 stream, err := c.cc.NewStream(ctx, &Destination_ServiceDesc.Streams[1], Destination_GetProfile_FullMethodName, opts...)
80 if err != nil {
81 return nil, err
82 }
83 x := &destinationGetProfileClient{stream}
84 if err := x.ClientStream.SendMsg(in); err != nil {
85 return nil, err
86 }
87 if err := x.ClientStream.CloseSend(); err != nil {
88 return nil, err
89 }
90 return x, nil
91 }
92
93 type Destination_GetProfileClient interface {
94 Recv() (*DestinationProfile, error)
95 grpc.ClientStream
96 }
97
98 type destinationGetProfileClient struct {
99 grpc.ClientStream
100 }
101
102 func (x *destinationGetProfileClient) Recv() (*DestinationProfile, error) {
103 m := new(DestinationProfile)
104 if err := x.ClientStream.RecvMsg(m); err != nil {
105 return nil, err
106 }
107 return m, nil
108 }
109
110
111
112
113 type DestinationServer interface {
114
115
116 Get(*GetDestination, Destination_GetServer) error
117
118
119 GetProfile(*GetDestination, Destination_GetProfileServer) error
120 mustEmbedUnimplementedDestinationServer()
121 }
122
123
124 type UnimplementedDestinationServer struct {
125 }
126
127 func (UnimplementedDestinationServer) Get(*GetDestination, Destination_GetServer) error {
128 return status.Errorf(codes.Unimplemented, "method Get not implemented")
129 }
130 func (UnimplementedDestinationServer) GetProfile(*GetDestination, Destination_GetProfileServer) error {
131 return status.Errorf(codes.Unimplemented, "method GetProfile not implemented")
132 }
133 func (UnimplementedDestinationServer) mustEmbedUnimplementedDestinationServer() {}
134
135
136
137
138 type UnsafeDestinationServer interface {
139 mustEmbedUnimplementedDestinationServer()
140 }
141
142 func RegisterDestinationServer(s grpc.ServiceRegistrar, srv DestinationServer) {
143 s.RegisterService(&Destination_ServiceDesc, srv)
144 }
145
146 func _Destination_Get_Handler(srv interface{}, stream grpc.ServerStream) error {
147 m := new(GetDestination)
148 if err := stream.RecvMsg(m); err != nil {
149 return err
150 }
151 return srv.(DestinationServer).Get(m, &destinationGetServer{stream})
152 }
153
154 type Destination_GetServer interface {
155 Send(*Update) error
156 grpc.ServerStream
157 }
158
159 type destinationGetServer struct {
160 grpc.ServerStream
161 }
162
163 func (x *destinationGetServer) Send(m *Update) error {
164 return x.ServerStream.SendMsg(m)
165 }
166
167 func _Destination_GetProfile_Handler(srv interface{}, stream grpc.ServerStream) error {
168 m := new(GetDestination)
169 if err := stream.RecvMsg(m); err != nil {
170 return err
171 }
172 return srv.(DestinationServer).GetProfile(m, &destinationGetProfileServer{stream})
173 }
174
175 type Destination_GetProfileServer interface {
176 Send(*DestinationProfile) error
177 grpc.ServerStream
178 }
179
180 type destinationGetProfileServer struct {
181 grpc.ServerStream
182 }
183
184 func (x *destinationGetProfileServer) Send(m *DestinationProfile) error {
185 return x.ServerStream.SendMsg(m)
186 }
187
188
189
190
191 var Destination_ServiceDesc = grpc.ServiceDesc{
192 ServiceName: "io.linkerd.proxy.destination.Destination",
193 HandlerType: (*DestinationServer)(nil),
194 Methods: []grpc.MethodDesc{},
195 Streams: []grpc.StreamDesc{
196 {
197 StreamName: "Get",
198 Handler: _Destination_Get_Handler,
199 ServerStreams: true,
200 },
201 {
202 StreamName: "GetProfile",
203 Handler: _Destination_GetProfile_Handler,
204 ServerStreams: true,
205 },
206 },
207 Metadata: "destination.proto",
208 }
209
View as plain text