socket adapter: don't bother sending sockclnt_delete messages
[govpp.git] / codec / testdata / binapi2001 / interfaces / interfaces_rpc.ba.go
1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
2
3 package interfaces
4
5 import (
6         "context"
7         "io"
8
9         api "git.fd.io/govpp.git/api"
10 )
11
12 // RPCService represents RPC service API for interface module.
13 type RPCService interface {
14         DumpSwInterface(ctx context.Context, in *SwInterfaceDump) (RPCService_DumpSwInterfaceClient, error)
15         DumpSwInterfaceRxPlacement(ctx context.Context, in *SwInterfaceRxPlacementDump) (RPCService_DumpSwInterfaceRxPlacementClient, error)
16         CollectDetailedInterfaceStats(ctx context.Context, in *CollectDetailedInterfaceStats) (*CollectDetailedInterfaceStatsReply, error)
17         CreateLoopback(ctx context.Context, in *CreateLoopback) (*CreateLoopbackReply, error)
18         CreateLoopbackInstance(ctx context.Context, in *CreateLoopbackInstance) (*CreateLoopbackInstanceReply, error)
19         CreateSubif(ctx context.Context, in *CreateSubif) (*CreateSubifReply, error)
20         CreateVlanSubif(ctx context.Context, in *CreateVlanSubif) (*CreateVlanSubifReply, error)
21         DeleteLoopback(ctx context.Context, in *DeleteLoopback) (*DeleteLoopbackReply, error)
22         DeleteSubif(ctx context.Context, in *DeleteSubif) (*DeleteSubifReply, error)
23         HwInterfaceSetMtu(ctx context.Context, in *HwInterfaceSetMtu) (*HwInterfaceSetMtuReply, error)
24         InterfaceNameRenumber(ctx context.Context, in *InterfaceNameRenumber) (*InterfaceNameRenumberReply, error)
25         SwInterfaceAddDelAddress(ctx context.Context, in *SwInterfaceAddDelAddress) (*SwInterfaceAddDelAddressReply, error)
26         SwInterfaceAddDelMacAddress(ctx context.Context, in *SwInterfaceAddDelMacAddress) (*SwInterfaceAddDelMacAddressReply, error)
27         SwInterfaceClearStats(ctx context.Context, in *SwInterfaceClearStats) (*SwInterfaceClearStatsReply, error)
28         SwInterfaceGetMacAddress(ctx context.Context, in *SwInterfaceGetMacAddress) (*SwInterfaceGetMacAddressReply, error)
29         SwInterfaceGetTable(ctx context.Context, in *SwInterfaceGetTable) (*SwInterfaceGetTableReply, error)
30         SwInterfaceSetFlags(ctx context.Context, in *SwInterfaceSetFlags) (*SwInterfaceSetFlagsReply, error)
31         SwInterfaceSetIPDirectedBroadcast(ctx context.Context, in *SwInterfaceSetIPDirectedBroadcast) (*SwInterfaceSetIPDirectedBroadcastReply, error)
32         SwInterfaceSetMacAddress(ctx context.Context, in *SwInterfaceSetMacAddress) (*SwInterfaceSetMacAddressReply, error)
33         SwInterfaceSetMtu(ctx context.Context, in *SwInterfaceSetMtu) (*SwInterfaceSetMtuReply, error)
34         SwInterfaceSetRxMode(ctx context.Context, in *SwInterfaceSetRxMode) (*SwInterfaceSetRxModeReply, error)
35         SwInterfaceSetRxPlacement(ctx context.Context, in *SwInterfaceSetRxPlacement) (*SwInterfaceSetRxPlacementReply, error)
36         SwInterfaceSetTable(ctx context.Context, in *SwInterfaceSetTable) (*SwInterfaceSetTableReply, error)
37         SwInterfaceSetUnnumbered(ctx context.Context, in *SwInterfaceSetUnnumbered) (*SwInterfaceSetUnnumberedReply, error)
38         SwInterfaceTagAddDel(ctx context.Context, in *SwInterfaceTagAddDel) (*SwInterfaceTagAddDelReply, error)
39         WantInterfaceEvents(ctx context.Context, in *WantInterfaceEvents) (*WantInterfaceEventsReply, error)
40 }
41
42 type serviceClient struct {
43         ch api.Channel
44 }
45
46 func NewServiceClient(ch api.Channel) RPCService {
47         return &serviceClient{ch}
48 }
49
50 func (c *serviceClient) DumpSwInterface(ctx context.Context, in *SwInterfaceDump) (RPCService_DumpSwInterfaceClient, error) {
51         stream := c.ch.SendMultiRequest(in)
52         x := &serviceClient_DumpSwInterfaceClient{stream}
53         return x, nil
54 }
55
56 type RPCService_DumpSwInterfaceClient interface {
57         Recv() (*SwInterfaceDetails, error)
58 }
59
60 type serviceClient_DumpSwInterfaceClient struct {
61         api.MultiRequestCtx
62 }
63
64 func (c *serviceClient_DumpSwInterfaceClient) Recv() (*SwInterfaceDetails, error) {
65         m := new(SwInterfaceDetails)
66         stop, err := c.MultiRequestCtx.ReceiveReply(m)
67         if err != nil {
68                 return nil, err
69         }
70         if stop {
71                 return nil, io.EOF
72         }
73         return m, nil
74 }
75
76 func (c *serviceClient) DumpSwInterfaceRxPlacement(ctx context.Context, in *SwInterfaceRxPlacementDump) (RPCService_DumpSwInterfaceRxPlacementClient, error) {
77         stream := c.ch.SendMultiRequest(in)
78         x := &serviceClient_DumpSwInterfaceRxPlacementClient{stream}
79         return x, nil
80 }
81
82 type RPCService_DumpSwInterfaceRxPlacementClient interface {
83         Recv() (*SwInterfaceRxPlacementDetails, error)
84 }
85
86 type serviceClient_DumpSwInterfaceRxPlacementClient struct {
87         api.MultiRequestCtx
88 }
89
90 func (c *serviceClient_DumpSwInterfaceRxPlacementClient) Recv() (*SwInterfaceRxPlacementDetails, error) {
91         m := new(SwInterfaceRxPlacementDetails)
92         stop, err := c.MultiRequestCtx.ReceiveReply(m)
93         if err != nil {
94                 return nil, err
95         }
96         if stop {
97                 return nil, io.EOF
98         }
99         return m, nil
100 }
101
102 func (c *serviceClient) CollectDetailedInterfaceStats(ctx context.Context, in *CollectDetailedInterfaceStats) (*CollectDetailedInterfaceStatsReply, error) {
103         out := new(CollectDetailedInterfaceStatsReply)
104         err := c.ch.SendRequest(in).ReceiveReply(out)
105         if err != nil {
106                 return nil, err
107         }
108         return out, nil
109 }
110
111 func (c *serviceClient) CreateLoopback(ctx context.Context, in *CreateLoopback) (*CreateLoopbackReply, error) {
112         out := new(CreateLoopbackReply)
113         err := c.ch.SendRequest(in).ReceiveReply(out)
114         if err != nil {
115                 return nil, err
116         }
117         return out, nil
118 }
119
120 func (c *serviceClient) CreateLoopbackInstance(ctx context.Context, in *CreateLoopbackInstance) (*CreateLoopbackInstanceReply, error) {
121         out := new(CreateLoopbackInstanceReply)
122         err := c.ch.SendRequest(in).ReceiveReply(out)
123         if err != nil {
124                 return nil, err
125         }
126         return out, nil
127 }
128
129 func (c *serviceClient) CreateSubif(ctx context.Context, in *CreateSubif) (*CreateSubifReply, error) {
130         out := new(CreateSubifReply)
131         err := c.ch.SendRequest(in).ReceiveReply(out)
132         if err != nil {
133                 return nil, err
134         }
135         return out, nil
136 }
137
138 func (c *serviceClient) CreateVlanSubif(ctx context.Context, in *CreateVlanSubif) (*CreateVlanSubifReply, error) {
139         out := new(CreateVlanSubifReply)
140         err := c.ch.SendRequest(in).ReceiveReply(out)
141         if err != nil {
142                 return nil, err
143         }
144         return out, nil
145 }
146
147 func (c *serviceClient) DeleteLoopback(ctx context.Context, in *DeleteLoopback) (*DeleteLoopbackReply, error) {
148         out := new(DeleteLoopbackReply)
149         err := c.ch.SendRequest(in).ReceiveReply(out)
150         if err != nil {
151                 return nil, err
152         }
153         return out, nil
154 }
155
156 func (c *serviceClient) DeleteSubif(ctx context.Context, in *DeleteSubif) (*DeleteSubifReply, error) {
157         out := new(DeleteSubifReply)
158         err := c.ch.SendRequest(in).ReceiveReply(out)
159         if err != nil {
160                 return nil, err
161         }
162         return out, nil
163 }
164
165 func (c *serviceClient) HwInterfaceSetMtu(ctx context.Context, in *HwInterfaceSetMtu) (*HwInterfaceSetMtuReply, error) {
166         out := new(HwInterfaceSetMtuReply)
167         err := c.ch.SendRequest(in).ReceiveReply(out)
168         if err != nil {
169                 return nil, err
170         }
171         return out, nil
172 }
173
174 func (c *serviceClient) InterfaceNameRenumber(ctx context.Context, in *InterfaceNameRenumber) (*InterfaceNameRenumberReply, error) {
175         out := new(InterfaceNameRenumberReply)
176         err := c.ch.SendRequest(in).ReceiveReply(out)
177         if err != nil {
178                 return nil, err
179         }
180         return out, nil
181 }
182
183 func (c *serviceClient) SwInterfaceAddDelAddress(ctx context.Context, in *SwInterfaceAddDelAddress) (*SwInterfaceAddDelAddressReply, error) {
184         out := new(SwInterfaceAddDelAddressReply)
185         err := c.ch.SendRequest(in).ReceiveReply(out)
186         if err != nil {
187                 return nil, err
188         }
189         return out, nil
190 }
191
192 func (c *serviceClient) SwInterfaceAddDelMacAddress(ctx context.Context, in *SwInterfaceAddDelMacAddress) (*SwInterfaceAddDelMacAddressReply, error) {
193         out := new(SwInterfaceAddDelMacAddressReply)
194         err := c.ch.SendRequest(in).ReceiveReply(out)
195         if err != nil {
196                 return nil, err
197         }
198         return out, nil
199 }
200
201 func (c *serviceClient) SwInterfaceClearStats(ctx context.Context, in *SwInterfaceClearStats) (*SwInterfaceClearStatsReply, error) {
202         out := new(SwInterfaceClearStatsReply)
203         err := c.ch.SendRequest(in).ReceiveReply(out)
204         if err != nil {
205                 return nil, err
206         }
207         return out, nil
208 }
209
210 func (c *serviceClient) SwInterfaceGetMacAddress(ctx context.Context, in *SwInterfaceGetMacAddress) (*SwInterfaceGetMacAddressReply, error) {
211         out := new(SwInterfaceGetMacAddressReply)
212         err := c.ch.SendRequest(in).ReceiveReply(out)
213         if err != nil {
214                 return nil, err
215         }
216         return out, nil
217 }
218
219 func (c *serviceClient) SwInterfaceGetTable(ctx context.Context, in *SwInterfaceGetTable) (*SwInterfaceGetTableReply, error) {
220         out := new(SwInterfaceGetTableReply)
221         err := c.ch.SendRequest(in).ReceiveReply(out)
222         if err != nil {
223                 return nil, err
224         }
225         return out, nil
226 }
227
228 func (c *serviceClient) SwInterfaceSetFlags(ctx context.Context, in *SwInterfaceSetFlags) (*SwInterfaceSetFlagsReply, error) {
229         out := new(SwInterfaceSetFlagsReply)
230         err := c.ch.SendRequest(in).ReceiveReply(out)
231         if err != nil {
232                 return nil, err
233         }
234         return out, nil
235 }
236
237 func (c *serviceClient) SwInterfaceSetIPDirectedBroadcast(ctx context.Context, in *SwInterfaceSetIPDirectedBroadcast) (*SwInterfaceSetIPDirectedBroadcastReply, error) {
238         out := new(SwInterfaceSetIPDirectedBroadcastReply)
239         err := c.ch.SendRequest(in).ReceiveReply(out)
240         if err != nil {
241                 return nil, err
242         }
243         return out, nil
244 }
245
246 func (c *serviceClient) SwInterfaceSetMacAddress(ctx context.Context, in *SwInterfaceSetMacAddress) (*SwInterfaceSetMacAddressReply, error) {
247         out := new(SwInterfaceSetMacAddressReply)
248         err := c.ch.SendRequest(in).ReceiveReply(out)
249         if err != nil {
250                 return nil, err
251         }
252         return out, nil
253 }
254
255 func (c *serviceClient) SwInterfaceSetMtu(ctx context.Context, in *SwInterfaceSetMtu) (*SwInterfaceSetMtuReply, error) {
256         out := new(SwInterfaceSetMtuReply)
257         err := c.ch.SendRequest(in).ReceiveReply(out)
258         if err != nil {
259                 return nil, err
260         }
261         return out, nil
262 }
263
264 func (c *serviceClient) SwInterfaceSetRxMode(ctx context.Context, in *SwInterfaceSetRxMode) (*SwInterfaceSetRxModeReply, error) {
265         out := new(SwInterfaceSetRxModeReply)
266         err := c.ch.SendRequest(in).ReceiveReply(out)
267         if err != nil {
268                 return nil, err
269         }
270         return out, nil
271 }
272
273 func (c *serviceClient) SwInterfaceSetRxPlacement(ctx context.Context, in *SwInterfaceSetRxPlacement) (*SwInterfaceSetRxPlacementReply, error) {
274         out := new(SwInterfaceSetRxPlacementReply)
275         err := c.ch.SendRequest(in).ReceiveReply(out)
276         if err != nil {
277                 return nil, err
278         }
279         return out, nil
280 }
281
282 func (c *serviceClient) SwInterfaceSetTable(ctx context.Context, in *SwInterfaceSetTable) (*SwInterfaceSetTableReply, error) {
283         out := new(SwInterfaceSetTableReply)
284         err := c.ch.SendRequest(in).ReceiveReply(out)
285         if err != nil {
286                 return nil, err
287         }
288         return out, nil
289 }
290
291 func (c *serviceClient) SwInterfaceSetUnnumbered(ctx context.Context, in *SwInterfaceSetUnnumbered) (*SwInterfaceSetUnnumberedReply, error) {
292         out := new(SwInterfaceSetUnnumberedReply)
293         err := c.ch.SendRequest(in).ReceiveReply(out)
294         if err != nil {
295                 return nil, err
296         }
297         return out, nil
298 }
299
300 func (c *serviceClient) SwInterfaceTagAddDel(ctx context.Context, in *SwInterfaceTagAddDel) (*SwInterfaceTagAddDelReply, error) {
301         out := new(SwInterfaceTagAddDelReply)
302         err := c.ch.SendRequest(in).ReceiveReply(out)
303         if err != nil {
304                 return nil, err
305         }
306         return out, nil
307 }
308
309 func (c *serviceClient) WantInterfaceEvents(ctx context.Context, in *WantInterfaceEvents) (*WantInterfaceEventsReply, error) {
310         out := new(WantInterfaceEventsReply)
311         err := c.ch.SendRequest(in).ReceiveReply(out)
312         if err != nil {
313                 return nil, err
314         }
315         return out, nil
316 }
317
318 // Reference imports to suppress errors if they are not otherwise used.
319 var _ = api.RegisterMessage
320 var _ = context.Background
321 var _ = io.Copy