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 tapv2.
14 type RPCService interface {
15 SwInterfaceTapV2Dump(ctx context.Context, in *SwInterfaceTapV2Dump) (RPCService_SwInterfaceTapV2DumpClient, error)
16 TapCreateV2(ctx context.Context, in *TapCreateV2) (*TapCreateV2Reply, error)
17 TapDeleteV2(ctx context.Context, in *TapDeleteV2) (*TapDeleteV2Reply, error)
20 type serviceClient struct {
24 func NewServiceClient(conn api.Connection) RPCService {
25 return &serviceClient{conn}
28 func (c *serviceClient) SwInterfaceTapV2Dump(ctx context.Context, in *SwInterfaceTapV2Dump) (RPCService_SwInterfaceTapV2DumpClient, error) {
29 stream, err := c.conn.NewStream(ctx)
33 x := &serviceClient_SwInterfaceTapV2DumpClient{stream}
34 if err := x.Stream.SendMsg(in); err != nil {
37 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
43 type RPCService_SwInterfaceTapV2DumpClient interface {
44 Recv() (*SwInterfaceTapV2Details, error)
48 type serviceClient_SwInterfaceTapV2DumpClient struct {
52 func (c *serviceClient_SwInterfaceTapV2DumpClient) Recv() (*SwInterfaceTapV2Details, error) {
53 msg, err := c.Stream.RecvMsg()
57 switch m := msg.(type) {
58 case *SwInterfaceTapV2Details:
60 case *vpe.ControlPingReply:
63 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
67 func (c *serviceClient) TapCreateV2(ctx context.Context, in *TapCreateV2) (*TapCreateV2Reply, error) {
68 out := new(TapCreateV2Reply)
69 err := c.conn.Invoke(ctx, in, out)
76 func (c *serviceClient) TapDeleteV2(ctx context.Context, in *TapDeleteV2) (*TapDeleteV2Reply, error) {
77 out := new(TapDeleteV2Reply)
78 err := c.conn.Invoke(ctx, in, out)