1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
10 api "git.fd.io/govpp.git/api"
11 vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
14 // RPCService defines RPC service classify.
15 type RPCService interface {
16 ClassifyAddDelSession(ctx context.Context, in *ClassifyAddDelSession) (*ClassifyAddDelSessionReply, error)
17 ClassifyAddDelTable(ctx context.Context, in *ClassifyAddDelTable) (*ClassifyAddDelTableReply, error)
18 ClassifySessionDump(ctx context.Context, in *ClassifySessionDump) (RPCService_ClassifySessionDumpClient, error)
19 ClassifySetInterfaceIPTable(ctx context.Context, in *ClassifySetInterfaceIPTable) (*ClassifySetInterfaceIPTableReply, error)
20 ClassifySetInterfaceL2Tables(ctx context.Context, in *ClassifySetInterfaceL2Tables) (*ClassifySetInterfaceL2TablesReply, error)
21 ClassifyTableByInterface(ctx context.Context, in *ClassifyTableByInterface) (*ClassifyTableByInterfaceReply, error)
22 ClassifyTableIds(ctx context.Context, in *ClassifyTableIds) (*ClassifyTableIdsReply, error)
23 ClassifyTableInfo(ctx context.Context, in *ClassifyTableInfo) (*ClassifyTableInfoReply, error)
24 FlowClassifyDump(ctx context.Context, in *FlowClassifyDump) (RPCService_FlowClassifyDumpClient, error)
25 FlowClassifySetInterface(ctx context.Context, in *FlowClassifySetInterface) (*FlowClassifySetInterfaceReply, error)
26 InputACLSetInterface(ctx context.Context, in *InputACLSetInterface) (*InputACLSetInterfaceReply, error)
27 OutputACLSetInterface(ctx context.Context, in *OutputACLSetInterface) (*OutputACLSetInterfaceReply, error)
28 PolicerClassifyDump(ctx context.Context, in *PolicerClassifyDump) (RPCService_PolicerClassifyDumpClient, error)
29 PolicerClassifySetInterface(ctx context.Context, in *PolicerClassifySetInterface) (*PolicerClassifySetInterfaceReply, error)
32 type serviceClient struct {
36 func NewServiceClient(conn api.Connection) RPCService {
37 return &serviceClient{conn}
40 func (c *serviceClient) ClassifyAddDelSession(ctx context.Context, in *ClassifyAddDelSession) (*ClassifyAddDelSessionReply, error) {
41 out := new(ClassifyAddDelSessionReply)
42 err := c.conn.Invoke(ctx, in, out)
46 return out, api.RetvalToVPPApiError(out.Retval)
49 func (c *serviceClient) ClassifyAddDelTable(ctx context.Context, in *ClassifyAddDelTable) (*ClassifyAddDelTableReply, error) {
50 out := new(ClassifyAddDelTableReply)
51 err := c.conn.Invoke(ctx, in, out)
55 return out, api.RetvalToVPPApiError(out.Retval)
58 func (c *serviceClient) ClassifySessionDump(ctx context.Context, in *ClassifySessionDump) (RPCService_ClassifySessionDumpClient, error) {
59 stream, err := c.conn.NewStream(ctx)
63 x := &serviceClient_ClassifySessionDumpClient{stream}
64 if err := x.Stream.SendMsg(in); err != nil {
67 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
73 type RPCService_ClassifySessionDumpClient interface {
74 Recv() (*ClassifySessionDetails, error)
78 type serviceClient_ClassifySessionDumpClient struct {
82 func (c *serviceClient_ClassifySessionDumpClient) Recv() (*ClassifySessionDetails, error) {
83 msg, err := c.Stream.RecvMsg()
87 switch m := msg.(type) {
88 case *ClassifySessionDetails:
90 case *vpe.ControlPingReply:
91 err = c.Stream.Close()
97 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
101 func (c *serviceClient) ClassifySetInterfaceIPTable(ctx context.Context, in *ClassifySetInterfaceIPTable) (*ClassifySetInterfaceIPTableReply, error) {
102 out := new(ClassifySetInterfaceIPTableReply)
103 err := c.conn.Invoke(ctx, in, out)
107 return out, api.RetvalToVPPApiError(out.Retval)
110 func (c *serviceClient) ClassifySetInterfaceL2Tables(ctx context.Context, in *ClassifySetInterfaceL2Tables) (*ClassifySetInterfaceL2TablesReply, error) {
111 out := new(ClassifySetInterfaceL2TablesReply)
112 err := c.conn.Invoke(ctx, in, out)
116 return out, api.RetvalToVPPApiError(out.Retval)
119 func (c *serviceClient) ClassifyTableByInterface(ctx context.Context, in *ClassifyTableByInterface) (*ClassifyTableByInterfaceReply, error) {
120 out := new(ClassifyTableByInterfaceReply)
121 err := c.conn.Invoke(ctx, in, out)
125 return out, api.RetvalToVPPApiError(out.Retval)
128 func (c *serviceClient) ClassifyTableIds(ctx context.Context, in *ClassifyTableIds) (*ClassifyTableIdsReply, error) {
129 out := new(ClassifyTableIdsReply)
130 err := c.conn.Invoke(ctx, in, out)
134 return out, api.RetvalToVPPApiError(out.Retval)
137 func (c *serviceClient) ClassifyTableInfo(ctx context.Context, in *ClassifyTableInfo) (*ClassifyTableInfoReply, error) {
138 out := new(ClassifyTableInfoReply)
139 err := c.conn.Invoke(ctx, in, out)
143 return out, api.RetvalToVPPApiError(out.Retval)
146 func (c *serviceClient) FlowClassifyDump(ctx context.Context, in *FlowClassifyDump) (RPCService_FlowClassifyDumpClient, error) {
147 stream, err := c.conn.NewStream(ctx)
151 x := &serviceClient_FlowClassifyDumpClient{stream}
152 if err := x.Stream.SendMsg(in); err != nil {
155 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
161 type RPCService_FlowClassifyDumpClient interface {
162 Recv() (*FlowClassifyDetails, error)
166 type serviceClient_FlowClassifyDumpClient struct {
170 func (c *serviceClient_FlowClassifyDumpClient) Recv() (*FlowClassifyDetails, error) {
171 msg, err := c.Stream.RecvMsg()
175 switch m := msg.(type) {
176 case *FlowClassifyDetails:
178 case *vpe.ControlPingReply:
179 err = c.Stream.Close()
185 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
189 func (c *serviceClient) FlowClassifySetInterface(ctx context.Context, in *FlowClassifySetInterface) (*FlowClassifySetInterfaceReply, error) {
190 out := new(FlowClassifySetInterfaceReply)
191 err := c.conn.Invoke(ctx, in, out)
195 return out, api.RetvalToVPPApiError(out.Retval)
198 func (c *serviceClient) InputACLSetInterface(ctx context.Context, in *InputACLSetInterface) (*InputACLSetInterfaceReply, error) {
199 out := new(InputACLSetInterfaceReply)
200 err := c.conn.Invoke(ctx, in, out)
204 return out, api.RetvalToVPPApiError(out.Retval)
207 func (c *serviceClient) OutputACLSetInterface(ctx context.Context, in *OutputACLSetInterface) (*OutputACLSetInterfaceReply, error) {
208 out := new(OutputACLSetInterfaceReply)
209 err := c.conn.Invoke(ctx, in, out)
213 return out, api.RetvalToVPPApiError(out.Retval)
216 func (c *serviceClient) PolicerClassifyDump(ctx context.Context, in *PolicerClassifyDump) (RPCService_PolicerClassifyDumpClient, error) {
217 stream, err := c.conn.NewStream(ctx)
221 x := &serviceClient_PolicerClassifyDumpClient{stream}
222 if err := x.Stream.SendMsg(in); err != nil {
225 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
231 type RPCService_PolicerClassifyDumpClient interface {
232 Recv() (*PolicerClassifyDetails, error)
236 type serviceClient_PolicerClassifyDumpClient struct {
240 func (c *serviceClient_PolicerClassifyDumpClient) Recv() (*PolicerClassifyDetails, error) {
241 msg, err := c.Stream.RecvMsg()
245 switch m := msg.(type) {
246 case *PolicerClassifyDetails:
248 case *vpe.ControlPingReply:
249 err = c.Stream.Close()
255 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
259 func (c *serviceClient) PolicerClassifySetInterface(ctx context.Context, in *PolicerClassifySetInterface) (*PolicerClassifySetInterfaceReply, error) {
260 out := new(PolicerClassifySetInterfaceReply)
261 err := c.conn.Invoke(ctx, in, out)
265 return out, api.RetvalToVPPApiError(out.Retval)