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 ip_neighbor.
14 type RPCService interface {
15 IPNeighborAddDel(ctx context.Context, in *IPNeighborAddDel) (*IPNeighborAddDelReply, error)
16 IPNeighborConfig(ctx context.Context, in *IPNeighborConfig) (*IPNeighborConfigReply, error)
17 IPNeighborDump(ctx context.Context, in *IPNeighborDump) (RPCService_IPNeighborDumpClient, error)
18 WantIPNeighborEvents(ctx context.Context, in *WantIPNeighborEvents) (*WantIPNeighborEventsReply, error)
21 type serviceClient struct {
25 func NewServiceClient(conn api.Connection) RPCService {
26 return &serviceClient{conn}
29 func (c *serviceClient) IPNeighborAddDel(ctx context.Context, in *IPNeighborAddDel) (*IPNeighborAddDelReply, error) {
30 out := new(IPNeighborAddDelReply)
31 err := c.conn.Invoke(ctx, in, out)
38 func (c *serviceClient) IPNeighborConfig(ctx context.Context, in *IPNeighborConfig) (*IPNeighborConfigReply, error) {
39 out := new(IPNeighborConfigReply)
40 err := c.conn.Invoke(ctx, in, out)
47 func (c *serviceClient) IPNeighborDump(ctx context.Context, in *IPNeighborDump) (RPCService_IPNeighborDumpClient, error) {
48 stream, err := c.conn.NewStream(ctx)
52 x := &serviceClient_IPNeighborDumpClient{stream}
53 if err := x.Stream.SendMsg(in); err != nil {
56 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
62 type RPCService_IPNeighborDumpClient interface {
63 Recv() (*IPNeighborDetails, error)
67 type serviceClient_IPNeighborDumpClient struct {
71 func (c *serviceClient_IPNeighborDumpClient) Recv() (*IPNeighborDetails, error) {
72 msg, err := c.Stream.RecvMsg()
76 switch m := msg.(type) {
77 case *IPNeighborDetails:
79 case *vpe.ControlPingReply:
82 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
86 func (c *serviceClient) WantIPNeighborEvents(ctx context.Context, in *WantIPNeighborEvents) (*WantIPNeighborEventsReply, error) {
87 out := new(WantIPNeighborEventsReply)
88 err := c.conn.Invoke(ctx, in, out)