Update generated binapi to v22.02 & makefile changes
[govpp.git] / internal / testbinapi / binapi2001 / netmap / netmap_rpc.ba.go
1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
2
3 package netmap
4
5 import (
6         "context"
7
8         api "git.fd.io/govpp.git/api"
9 )
10
11 // RPCService defines RPC service netmap.
12 type RPCService interface {
13         NetmapCreate(ctx context.Context, in *NetmapCreate) (*NetmapCreateReply, error)
14         NetmapDelete(ctx context.Context, in *NetmapDelete) (*NetmapDeleteReply, error)
15 }
16
17 type serviceClient struct {
18         conn api.Connection
19 }
20
21 func NewServiceClient(conn api.Connection) RPCService {
22         return &serviceClient{conn}
23 }
24
25 func (c *serviceClient) NetmapCreate(ctx context.Context, in *NetmapCreate) (*NetmapCreateReply, error) {
26         out := new(NetmapCreateReply)
27         err := c.conn.Invoke(ctx, in, out)
28         if err != nil {
29                 return nil, err
30         }
31         return out, api.RetvalToVPPApiError(out.Retval)
32 }
33
34 func (c *serviceClient) NetmapDelete(ctx context.Context, in *NetmapDelete) (*NetmapDeleteReply, error) {
35         out := new(NetmapDeleteReply)
36         err := c.conn.Invoke(ctx, in, out)
37         if err != nil {
38                 return nil, err
39         }
40         return out, api.RetvalToVPPApiError(out.Retval)
41 }