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/binapi/vpe"
14 // RPCService defines RPC service ipip.
15 type RPCService interface {
16 Ipip6rdAddTunnel(ctx context.Context, in *Ipip6rdAddTunnel) (*Ipip6rdAddTunnelReply, error)
17 Ipip6rdDelTunnel(ctx context.Context, in *Ipip6rdDelTunnel) (*Ipip6rdDelTunnelReply, error)
18 IpipAddTunnel(ctx context.Context, in *IpipAddTunnel) (*IpipAddTunnelReply, error)
19 IpipDelTunnel(ctx context.Context, in *IpipDelTunnel) (*IpipDelTunnelReply, error)
20 IpipTunnelDump(ctx context.Context, in *IpipTunnelDump) (RPCService_IpipTunnelDumpClient, error)
23 type serviceClient struct {
27 func NewServiceClient(conn api.Connection) RPCService {
28 return &serviceClient{conn}
31 func (c *serviceClient) Ipip6rdAddTunnel(ctx context.Context, in *Ipip6rdAddTunnel) (*Ipip6rdAddTunnelReply, error) {
32 out := new(Ipip6rdAddTunnelReply)
33 err := c.conn.Invoke(ctx, in, out)
37 return out, api.RetvalToVPPApiError(out.Retval)
40 func (c *serviceClient) Ipip6rdDelTunnel(ctx context.Context, in *Ipip6rdDelTunnel) (*Ipip6rdDelTunnelReply, error) {
41 out := new(Ipip6rdDelTunnelReply)
42 err := c.conn.Invoke(ctx, in, out)
46 return out, api.RetvalToVPPApiError(out.Retval)
49 func (c *serviceClient) IpipAddTunnel(ctx context.Context, in *IpipAddTunnel) (*IpipAddTunnelReply, error) {
50 out := new(IpipAddTunnelReply)
51 err := c.conn.Invoke(ctx, in, out)
55 return out, api.RetvalToVPPApiError(out.Retval)
58 func (c *serviceClient) IpipDelTunnel(ctx context.Context, in *IpipDelTunnel) (*IpipDelTunnelReply, error) {
59 out := new(IpipDelTunnelReply)
60 err := c.conn.Invoke(ctx, in, out)
64 return out, api.RetvalToVPPApiError(out.Retval)
67 func (c *serviceClient) IpipTunnelDump(ctx context.Context, in *IpipTunnelDump) (RPCService_IpipTunnelDumpClient, error) {
68 stream, err := c.conn.NewStream(ctx)
72 x := &serviceClient_IpipTunnelDumpClient{stream}
73 if err := x.Stream.SendMsg(in); err != nil {
76 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
82 type RPCService_IpipTunnelDumpClient interface {
83 Recv() (*IpipTunnelDetails, error)
87 type serviceClient_IpipTunnelDumpClient struct {
91 func (c *serviceClient_IpipTunnelDumpClient) Recv() (*IpipTunnelDetails, error) {
92 msg, err := c.Stream.RecvMsg()
96 switch m := msg.(type) {
97 case *IpipTunnelDetails:
99 case *vpe.ControlPingReply:
100 err = c.Stream.Close()
106 return nil, fmt.Errorf("unexpected message: %T %v", m, m)