1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
8 api "git.fd.io/govpp.git/api"
9 vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
13 // RPCService defines RPC service interface.
14 type RPCService interface {
15 CollectDetailedInterfaceStats(ctx context.Context, in *CollectDetailedInterfaceStats) (*CollectDetailedInterfaceStatsReply, error)
16 CreateLoopback(ctx context.Context, in *CreateLoopback) (*CreateLoopbackReply, error)
17 CreateLoopbackInstance(ctx context.Context, in *CreateLoopbackInstance) (*CreateLoopbackInstanceReply, error)
18 CreateSubif(ctx context.Context, in *CreateSubif) (*CreateSubifReply, error)
19 CreateVlanSubif(ctx context.Context, in *CreateVlanSubif) (*CreateVlanSubifReply, error)
20 DeleteLoopback(ctx context.Context, in *DeleteLoopback) (*DeleteLoopbackReply, error)
21 DeleteSubif(ctx context.Context, in *DeleteSubif) (*DeleteSubifReply, error)
22 HwInterfaceSetMtu(ctx context.Context, in *HwInterfaceSetMtu) (*HwInterfaceSetMtuReply, error)
23 InterfaceNameRenumber(ctx context.Context, in *InterfaceNameRenumber) (*InterfaceNameRenumberReply, error)
24 SwInterfaceAddDelAddress(ctx context.Context, in *SwInterfaceAddDelAddress) (*SwInterfaceAddDelAddressReply, error)
25 SwInterfaceAddDelMacAddress(ctx context.Context, in *SwInterfaceAddDelMacAddress) (*SwInterfaceAddDelMacAddressReply, error)
26 SwInterfaceClearStats(ctx context.Context, in *SwInterfaceClearStats) (*SwInterfaceClearStatsReply, error)
27 SwInterfaceDump(ctx context.Context, in *SwInterfaceDump) (RPCService_SwInterfaceDumpClient, error)
28 SwInterfaceGetMacAddress(ctx context.Context, in *SwInterfaceGetMacAddress) (*SwInterfaceGetMacAddressReply, error)
29 SwInterfaceGetTable(ctx context.Context, in *SwInterfaceGetTable) (*SwInterfaceGetTableReply, error)
30 SwInterfaceRxPlacementDump(ctx context.Context, in *SwInterfaceRxPlacementDump) (RPCService_SwInterfaceRxPlacementDumpClient, error)
31 SwInterfaceSetFlags(ctx context.Context, in *SwInterfaceSetFlags) (*SwInterfaceSetFlagsReply, error)
32 SwInterfaceSetIPDirectedBroadcast(ctx context.Context, in *SwInterfaceSetIPDirectedBroadcast) (*SwInterfaceSetIPDirectedBroadcastReply, error)
33 SwInterfaceSetMacAddress(ctx context.Context, in *SwInterfaceSetMacAddress) (*SwInterfaceSetMacAddressReply, error)
34 SwInterfaceSetMtu(ctx context.Context, in *SwInterfaceSetMtu) (*SwInterfaceSetMtuReply, error)
35 SwInterfaceSetRxMode(ctx context.Context, in *SwInterfaceSetRxMode) (*SwInterfaceSetRxModeReply, error)
36 SwInterfaceSetRxPlacement(ctx context.Context, in *SwInterfaceSetRxPlacement) (*SwInterfaceSetRxPlacementReply, error)
37 SwInterfaceSetTable(ctx context.Context, in *SwInterfaceSetTable) (*SwInterfaceSetTableReply, error)
38 SwInterfaceSetUnnumbered(ctx context.Context, in *SwInterfaceSetUnnumbered) (*SwInterfaceSetUnnumberedReply, error)
39 SwInterfaceTagAddDel(ctx context.Context, in *SwInterfaceTagAddDel) (*SwInterfaceTagAddDelReply, error)
40 WantInterfaceEvents(ctx context.Context, in *WantInterfaceEvents) (*WantInterfaceEventsReply, error)
43 type serviceClient struct {
47 func NewServiceClient(conn api.Connection) RPCService {
48 return &serviceClient{conn}
51 func (c *serviceClient) CollectDetailedInterfaceStats(ctx context.Context, in *CollectDetailedInterfaceStats) (*CollectDetailedInterfaceStatsReply, error) {
52 out := new(CollectDetailedInterfaceStatsReply)
53 err := c.conn.Invoke(ctx, in, out)
60 func (c *serviceClient) CreateLoopback(ctx context.Context, in *CreateLoopback) (*CreateLoopbackReply, error) {
61 out := new(CreateLoopbackReply)
62 err := c.conn.Invoke(ctx, in, out)
69 func (c *serviceClient) CreateLoopbackInstance(ctx context.Context, in *CreateLoopbackInstance) (*CreateLoopbackInstanceReply, error) {
70 out := new(CreateLoopbackInstanceReply)
71 err := c.conn.Invoke(ctx, in, out)
78 func (c *serviceClient) CreateSubif(ctx context.Context, in *CreateSubif) (*CreateSubifReply, error) {
79 out := new(CreateSubifReply)
80 err := c.conn.Invoke(ctx, in, out)
87 func (c *serviceClient) CreateVlanSubif(ctx context.Context, in *CreateVlanSubif) (*CreateVlanSubifReply, error) {
88 out := new(CreateVlanSubifReply)
89 err := c.conn.Invoke(ctx, in, out)
96 func (c *serviceClient) DeleteLoopback(ctx context.Context, in *DeleteLoopback) (*DeleteLoopbackReply, error) {
97 out := new(DeleteLoopbackReply)
98 err := c.conn.Invoke(ctx, in, out)
105 func (c *serviceClient) DeleteSubif(ctx context.Context, in *DeleteSubif) (*DeleteSubifReply, error) {
106 out := new(DeleteSubifReply)
107 err := c.conn.Invoke(ctx, in, out)
114 func (c *serviceClient) HwInterfaceSetMtu(ctx context.Context, in *HwInterfaceSetMtu) (*HwInterfaceSetMtuReply, error) {
115 out := new(HwInterfaceSetMtuReply)
116 err := c.conn.Invoke(ctx, in, out)
123 func (c *serviceClient) InterfaceNameRenumber(ctx context.Context, in *InterfaceNameRenumber) (*InterfaceNameRenumberReply, error) {
124 out := new(InterfaceNameRenumberReply)
125 err := c.conn.Invoke(ctx, in, out)
132 func (c *serviceClient) SwInterfaceAddDelAddress(ctx context.Context, in *SwInterfaceAddDelAddress) (*SwInterfaceAddDelAddressReply, error) {
133 out := new(SwInterfaceAddDelAddressReply)
134 err := c.conn.Invoke(ctx, in, out)
141 func (c *serviceClient) SwInterfaceAddDelMacAddress(ctx context.Context, in *SwInterfaceAddDelMacAddress) (*SwInterfaceAddDelMacAddressReply, error) {
142 out := new(SwInterfaceAddDelMacAddressReply)
143 err := c.conn.Invoke(ctx, in, out)
150 func (c *serviceClient) SwInterfaceClearStats(ctx context.Context, in *SwInterfaceClearStats) (*SwInterfaceClearStatsReply, error) {
151 out := new(SwInterfaceClearStatsReply)
152 err := c.conn.Invoke(ctx, in, out)
159 func (c *serviceClient) SwInterfaceDump(ctx context.Context, in *SwInterfaceDump) (RPCService_SwInterfaceDumpClient, error) {
160 stream, err := c.conn.NewStream(ctx)
164 x := &serviceClient_SwInterfaceDumpClient{stream}
165 if err := x.Stream.SendMsg(in); err != nil {
168 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
174 type RPCService_SwInterfaceDumpClient interface {
175 Recv() (*SwInterfaceDetails, error)
179 type serviceClient_SwInterfaceDumpClient struct {
183 func (c *serviceClient_SwInterfaceDumpClient) Recv() (*SwInterfaceDetails, error) {
184 msg, err := c.Stream.RecvMsg()
188 switch m := msg.(type) {
189 case *SwInterfaceDetails:
191 case *vpe.ControlPingReply:
194 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
198 func (c *serviceClient) SwInterfaceGetMacAddress(ctx context.Context, in *SwInterfaceGetMacAddress) (*SwInterfaceGetMacAddressReply, error) {
199 out := new(SwInterfaceGetMacAddressReply)
200 err := c.conn.Invoke(ctx, in, out)
207 func (c *serviceClient) SwInterfaceGetTable(ctx context.Context, in *SwInterfaceGetTable) (*SwInterfaceGetTableReply, error) {
208 out := new(SwInterfaceGetTableReply)
209 err := c.conn.Invoke(ctx, in, out)
216 func (c *serviceClient) SwInterfaceRxPlacementDump(ctx context.Context, in *SwInterfaceRxPlacementDump) (RPCService_SwInterfaceRxPlacementDumpClient, error) {
217 stream, err := c.conn.NewStream(ctx)
221 x := &serviceClient_SwInterfaceRxPlacementDumpClient{stream}
222 if err := x.Stream.SendMsg(in); err != nil {
225 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
231 type RPCService_SwInterfaceRxPlacementDumpClient interface {
232 Recv() (*SwInterfaceRxPlacementDetails, error)
236 type serviceClient_SwInterfaceRxPlacementDumpClient struct {
240 func (c *serviceClient_SwInterfaceRxPlacementDumpClient) Recv() (*SwInterfaceRxPlacementDetails, error) {
241 msg, err := c.Stream.RecvMsg()
245 switch m := msg.(type) {
246 case *SwInterfaceRxPlacementDetails:
248 case *vpe.ControlPingReply:
251 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
255 func (c *serviceClient) SwInterfaceSetFlags(ctx context.Context, in *SwInterfaceSetFlags) (*SwInterfaceSetFlagsReply, error) {
256 out := new(SwInterfaceSetFlagsReply)
257 err := c.conn.Invoke(ctx, in, out)
264 func (c *serviceClient) SwInterfaceSetIPDirectedBroadcast(ctx context.Context, in *SwInterfaceSetIPDirectedBroadcast) (*SwInterfaceSetIPDirectedBroadcastReply, error) {
265 out := new(SwInterfaceSetIPDirectedBroadcastReply)
266 err := c.conn.Invoke(ctx, in, out)
273 func (c *serviceClient) SwInterfaceSetMacAddress(ctx context.Context, in *SwInterfaceSetMacAddress) (*SwInterfaceSetMacAddressReply, error) {
274 out := new(SwInterfaceSetMacAddressReply)
275 err := c.conn.Invoke(ctx, in, out)
282 func (c *serviceClient) SwInterfaceSetMtu(ctx context.Context, in *SwInterfaceSetMtu) (*SwInterfaceSetMtuReply, error) {
283 out := new(SwInterfaceSetMtuReply)
284 err := c.conn.Invoke(ctx, in, out)
291 func (c *serviceClient) SwInterfaceSetRxMode(ctx context.Context, in *SwInterfaceSetRxMode) (*SwInterfaceSetRxModeReply, error) {
292 out := new(SwInterfaceSetRxModeReply)
293 err := c.conn.Invoke(ctx, in, out)
300 func (c *serviceClient) SwInterfaceSetRxPlacement(ctx context.Context, in *SwInterfaceSetRxPlacement) (*SwInterfaceSetRxPlacementReply, error) {
301 out := new(SwInterfaceSetRxPlacementReply)
302 err := c.conn.Invoke(ctx, in, out)
309 func (c *serviceClient) SwInterfaceSetTable(ctx context.Context, in *SwInterfaceSetTable) (*SwInterfaceSetTableReply, error) {
310 out := new(SwInterfaceSetTableReply)
311 err := c.conn.Invoke(ctx, in, out)
318 func (c *serviceClient) SwInterfaceSetUnnumbered(ctx context.Context, in *SwInterfaceSetUnnumbered) (*SwInterfaceSetUnnumberedReply, error) {
319 out := new(SwInterfaceSetUnnumberedReply)
320 err := c.conn.Invoke(ctx, in, out)
327 func (c *serviceClient) SwInterfaceTagAddDel(ctx context.Context, in *SwInterfaceTagAddDel) (*SwInterfaceTagAddDelReply, error) {
328 out := new(SwInterfaceTagAddDelReply)
329 err := c.conn.Invoke(ctx, in, out)
336 func (c *serviceClient) WantInterfaceEvents(ctx context.Context, in *WantInterfaceEvents) (*WantInterfaceEventsReply, error) {
337 out := new(WantInterfaceEventsReply)
338 err := c.conn.Invoke(ctx, in, out)