ad828b4b37d7d67b818fdcd1d3d3d8d39c1eda42
[govpp.git] / binapi / flow / flow_rpc.ba.go
1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
2
3 package flow
4
5 import (
6         "context"
7
8         api "git.fd.io/govpp.git/api"
9 )
10
11 // RPCService defines RPC service flow.
12 type RPCService interface {
13         FlowAdd(ctx context.Context, in *FlowAdd) (*FlowAddReply, error)
14         FlowDel(ctx context.Context, in *FlowDel) (*FlowDelReply, error)
15         FlowDisable(ctx context.Context, in *FlowDisable) (*FlowDisableReply, error)
16         FlowEnable(ctx context.Context, in *FlowEnable) (*FlowEnableReply, error)
17 }
18
19 type serviceClient struct {
20         conn api.Connection
21 }
22
23 func NewServiceClient(conn api.Connection) RPCService {
24         return &serviceClient{conn}
25 }
26
27 func (c *serviceClient) FlowAdd(ctx context.Context, in *FlowAdd) (*FlowAddReply, error) {
28         out := new(FlowAddReply)
29         err := c.conn.Invoke(ctx, in, out)
30         if err != nil {
31                 return nil, err
32         }
33         return out, api.RetvalToVPPApiError(out.Retval)
34 }
35
36 func (c *serviceClient) FlowDel(ctx context.Context, in *FlowDel) (*FlowDelReply, error) {
37         out := new(FlowDelReply)
38         err := c.conn.Invoke(ctx, in, out)
39         if err != nil {
40                 return nil, err
41         }
42         return out, api.RetvalToVPPApiError(out.Retval)
43 }
44
45 func (c *serviceClient) FlowDisable(ctx context.Context, in *FlowDisable) (*FlowDisableReply, error) {
46         out := new(FlowDisableReply)
47         err := c.conn.Invoke(ctx, in, out)
48         if err != nil {
49                 return nil, err
50         }
51         return out, api.RetvalToVPPApiError(out.Retval)
52 }
53
54 func (c *serviceClient) FlowEnable(ctx context.Context, in *FlowEnable) (*FlowEnableReply, error) {
55         out := new(FlowEnableReply)
56         err := c.conn.Invoke(ctx, in, out)
57         if err != nil {
58                 return nil, err
59         }
60         return out, api.RetvalToVPPApiError(out.Retval)
61 }