db784884aaad4eba64a77839c039b1c07389a4d2
[govpp.git] / binapi / af_xdp / af_xdp_rpc.ba.go
1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
2
3 package af_xdp
4
5 import (
6         "context"
7
8         api "git.fd.io/govpp.git/api"
9 )
10
11 // RPCService defines RPC service af_xdp.
12 type RPCService interface {
13         AfXdpCreate(ctx context.Context, in *AfXdpCreate) (*AfXdpCreateReply, error)
14         AfXdpCreateV2(ctx context.Context, in *AfXdpCreateV2) (*AfXdpCreateV2Reply, error)
15         AfXdpDelete(ctx context.Context, in *AfXdpDelete) (*AfXdpDeleteReply, error)
16 }
17
18 type serviceClient struct {
19         conn api.Connection
20 }
21
22 func NewServiceClient(conn api.Connection) RPCService {
23         return &serviceClient{conn}
24 }
25
26 func (c *serviceClient) AfXdpCreate(ctx context.Context, in *AfXdpCreate) (*AfXdpCreateReply, error) {
27         out := new(AfXdpCreateReply)
28         err := c.conn.Invoke(ctx, in, out)
29         if err != nil {
30                 return nil, err
31         }
32         return out, api.RetvalToVPPApiError(out.Retval)
33 }
34
35 func (c *serviceClient) AfXdpCreateV2(ctx context.Context, in *AfXdpCreateV2) (*AfXdpCreateV2Reply, error) {
36         out := new(AfXdpCreateV2Reply)
37         err := c.conn.Invoke(ctx, in, out)
38         if err != nil {
39                 return nil, err
40         }
41         return out, api.RetvalToVPPApiError(out.Retval)
42 }
43
44 func (c *serviceClient) AfXdpDelete(ctx context.Context, in *AfXdpDelete) (*AfXdpDeleteReply, error) {
45         out := new(AfXdpDeleteReply)
46         err := c.conn.Invoke(ctx, in, out)
47         if err != nil {
48                 return nil, err
49         }
50         return out, api.RetvalToVPPApiError(out.Retval)
51 }