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 geneve.
15 type RPCService interface {
16 GeneveAddDelTunnel(ctx context.Context, in *GeneveAddDelTunnel) (*GeneveAddDelTunnelReply, error)
17 GeneveTunnelDump(ctx context.Context, in *GeneveTunnelDump) (RPCService_GeneveTunnelDumpClient, error)
18 SwInterfaceSetGeneveBypass(ctx context.Context, in *SwInterfaceSetGeneveBypass) (*SwInterfaceSetGeneveBypassReply, error)
21 type serviceClient struct {
25 func NewServiceClient(conn api.Connection) RPCService {
26 return &serviceClient{conn}
29 func (c *serviceClient) GeneveAddDelTunnel(ctx context.Context, in *GeneveAddDelTunnel) (*GeneveAddDelTunnelReply, error) {
30 out := new(GeneveAddDelTunnelReply)
31 err := c.conn.Invoke(ctx, in, out)
38 func (c *serviceClient) GeneveTunnelDump(ctx context.Context, in *GeneveTunnelDump) (RPCService_GeneveTunnelDumpClient, error) {
39 stream, err := c.conn.NewStream(ctx)
43 x := &serviceClient_GeneveTunnelDumpClient{stream}
44 if err := x.Stream.SendMsg(in); err != nil {
47 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
53 type RPCService_GeneveTunnelDumpClient interface {
54 Recv() (*GeneveTunnelDetails, error)
58 type serviceClient_GeneveTunnelDumpClient struct {
62 func (c *serviceClient_GeneveTunnelDumpClient) Recv() (*GeneveTunnelDetails, error) {
63 msg, err := c.Stream.RecvMsg()
67 switch m := msg.(type) {
68 case *GeneveTunnelDetails:
70 case *vpe.ControlPingReply:
73 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
77 func (c *serviceClient) SwInterfaceSetGeneveBypass(ctx context.Context, in *SwInterfaceSetGeneveBypass) (*SwInterfaceSetGeneveBypassReply, error) {
78 out := new(SwInterfaceSetGeneveBypassReply)
79 err := c.conn.Invoke(ctx, in, out)