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 gre.
14 type RPCService interface {
15 GreTunnelAddDel(ctx context.Context, in *GreTunnelAddDel) (*GreTunnelAddDelReply, error)
16 GreTunnelDump(ctx context.Context, in *GreTunnelDump) (RPCService_GreTunnelDumpClient, error)
19 type serviceClient struct {
23 func NewServiceClient(conn api.Connection) RPCService {
24 return &serviceClient{conn}
27 func (c *serviceClient) GreTunnelAddDel(ctx context.Context, in *GreTunnelAddDel) (*GreTunnelAddDelReply, error) {
28 out := new(GreTunnelAddDelReply)
29 err := c.conn.Invoke(ctx, in, out)
36 func (c *serviceClient) GreTunnelDump(ctx context.Context, in *GreTunnelDump) (RPCService_GreTunnelDumpClient, error) {
37 stream, err := c.conn.NewStream(ctx)
41 x := &serviceClient_GreTunnelDumpClient{stream}
42 if err := x.Stream.SendMsg(in); err != nil {
45 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
51 type RPCService_GreTunnelDumpClient interface {
52 Recv() (*GreTunnelDetails, error)
56 type serviceClient_GreTunnelDumpClient struct {
60 func (c *serviceClient_GreTunnelDumpClient) Recv() (*GreTunnelDetails, error) {
61 msg, err := c.Stream.RecvMsg()
65 switch m := msg.(type) {
66 case *GreTunnelDetails:
68 case *vpe.ControlPingReply:
71 return nil, fmt.Errorf("unexpected message: %T %v", m, m)