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 l2tp.
14 type RPCService interface {
15 L2tpv3CreateTunnel(ctx context.Context, in *L2tpv3CreateTunnel) (*L2tpv3CreateTunnelReply, error)
16 L2tpv3InterfaceEnableDisable(ctx context.Context, in *L2tpv3InterfaceEnableDisable) (*L2tpv3InterfaceEnableDisableReply, error)
17 L2tpv3SetLookupKey(ctx context.Context, in *L2tpv3SetLookupKey) (*L2tpv3SetLookupKeyReply, error)
18 L2tpv3SetTunnelCookies(ctx context.Context, in *L2tpv3SetTunnelCookies) (*L2tpv3SetTunnelCookiesReply, error)
19 SwIfL2tpv3TunnelDump(ctx context.Context, in *SwIfL2tpv3TunnelDump) (RPCService_SwIfL2tpv3TunnelDumpClient, error)
22 type serviceClient struct {
26 func NewServiceClient(conn api.Connection) RPCService {
27 return &serviceClient{conn}
30 func (c *serviceClient) L2tpv3CreateTunnel(ctx context.Context, in *L2tpv3CreateTunnel) (*L2tpv3CreateTunnelReply, error) {
31 out := new(L2tpv3CreateTunnelReply)
32 err := c.conn.Invoke(ctx, in, out)
39 func (c *serviceClient) L2tpv3InterfaceEnableDisable(ctx context.Context, in *L2tpv3InterfaceEnableDisable) (*L2tpv3InterfaceEnableDisableReply, error) {
40 out := new(L2tpv3InterfaceEnableDisableReply)
41 err := c.conn.Invoke(ctx, in, out)
48 func (c *serviceClient) L2tpv3SetLookupKey(ctx context.Context, in *L2tpv3SetLookupKey) (*L2tpv3SetLookupKeyReply, error) {
49 out := new(L2tpv3SetLookupKeyReply)
50 err := c.conn.Invoke(ctx, in, out)
57 func (c *serviceClient) L2tpv3SetTunnelCookies(ctx context.Context, in *L2tpv3SetTunnelCookies) (*L2tpv3SetTunnelCookiesReply, error) {
58 out := new(L2tpv3SetTunnelCookiesReply)
59 err := c.conn.Invoke(ctx, in, out)
66 func (c *serviceClient) SwIfL2tpv3TunnelDump(ctx context.Context, in *SwIfL2tpv3TunnelDump) (RPCService_SwIfL2tpv3TunnelDumpClient, error) {
67 stream, err := c.conn.NewStream(ctx)
71 x := &serviceClient_SwIfL2tpv3TunnelDumpClient{stream}
72 if err := x.Stream.SendMsg(in); err != nil {
75 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
81 type RPCService_SwIfL2tpv3TunnelDumpClient interface {
82 Recv() (*SwIfL2tpv3TunnelDetails, error)
86 type serviceClient_SwIfL2tpv3TunnelDumpClient struct {
90 func (c *serviceClient_SwIfL2tpv3TunnelDumpClient) Recv() (*SwIfL2tpv3TunnelDetails, error) {
91 msg, err := c.Stream.RecvMsg()
95 switch m := msg.(type) {
96 case *SwIfL2tpv3TunnelDetails:
98 case *vpe.ControlPingReply:
101 return nil, fmt.Errorf("unexpected message: %T %v", m, m)