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 gtpu.
15 type RPCService interface {
16 GtpuAddDelTunnel(ctx context.Context, in *GtpuAddDelTunnel) (*GtpuAddDelTunnelReply, error)
17 GtpuOffloadRx(ctx context.Context, in *GtpuOffloadRx) (*GtpuOffloadRxReply, error)
18 GtpuTunnelDump(ctx context.Context, in *GtpuTunnelDump) (RPCService_GtpuTunnelDumpClient, error)
19 GtpuTunnelUpdateTteid(ctx context.Context, in *GtpuTunnelUpdateTteid) (*GtpuTunnelUpdateTteidReply, error)
20 SwInterfaceSetGtpuBypass(ctx context.Context, in *SwInterfaceSetGtpuBypass) (*SwInterfaceSetGtpuBypassReply, error)
23 type serviceClient struct {
27 func NewServiceClient(conn api.Connection) RPCService {
28 return &serviceClient{conn}
31 func (c *serviceClient) GtpuAddDelTunnel(ctx context.Context, in *GtpuAddDelTunnel) (*GtpuAddDelTunnelReply, error) {
32 out := new(GtpuAddDelTunnelReply)
33 err := c.conn.Invoke(ctx, in, out)
37 return out, api.RetvalToVPPApiError(out.Retval)
40 func (c *serviceClient) GtpuOffloadRx(ctx context.Context, in *GtpuOffloadRx) (*GtpuOffloadRxReply, error) {
41 out := new(GtpuOffloadRxReply)
42 err := c.conn.Invoke(ctx, in, out)
46 return out, api.RetvalToVPPApiError(out.Retval)
49 func (c *serviceClient) GtpuTunnelDump(ctx context.Context, in *GtpuTunnelDump) (RPCService_GtpuTunnelDumpClient, error) {
50 stream, err := c.conn.NewStream(ctx)
54 x := &serviceClient_GtpuTunnelDumpClient{stream}
55 if err := x.Stream.SendMsg(in); err != nil {
58 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
64 type RPCService_GtpuTunnelDumpClient interface {
65 Recv() (*GtpuTunnelDetails, error)
69 type serviceClient_GtpuTunnelDumpClient struct {
73 func (c *serviceClient_GtpuTunnelDumpClient) Recv() (*GtpuTunnelDetails, error) {
74 msg, err := c.Stream.RecvMsg()
78 switch m := msg.(type) {
79 case *GtpuTunnelDetails:
81 case *vpe.ControlPingReply:
82 err = c.Stream.Close()
88 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
92 func (c *serviceClient) GtpuTunnelUpdateTteid(ctx context.Context, in *GtpuTunnelUpdateTteid) (*GtpuTunnelUpdateTteidReply, error) {
93 out := new(GtpuTunnelUpdateTteidReply)
94 err := c.conn.Invoke(ctx, in, out)
98 return out, api.RetvalToVPPApiError(out.Retval)
101 func (c *serviceClient) SwInterfaceSetGtpuBypass(ctx context.Context, in *SwInterfaceSetGtpuBypass) (*SwInterfaceSetGtpuBypassReply, error) {
102 out := new(SwInterfaceSetGtpuBypassReply)
103 err := c.conn.Invoke(ctx, in, out)
107 return out, api.RetvalToVPPApiError(out.Retval)