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/internal/testbinapi/binapi2001/vpe"
14 // RPCService defines RPC service ip_neighbor.
15 type RPCService interface {
16 IPNeighborAddDel(ctx context.Context, in *IPNeighborAddDel) (*IPNeighborAddDelReply, error)
17 IPNeighborConfig(ctx context.Context, in *IPNeighborConfig) (*IPNeighborConfigReply, error)
18 IPNeighborDump(ctx context.Context, in *IPNeighborDump) (RPCService_IPNeighborDumpClient, error)
19 WantIPNeighborEvents(ctx context.Context, in *WantIPNeighborEvents) (*WantIPNeighborEventsReply, error)
22 type serviceClient struct {
26 func NewServiceClient(conn api.Connection) RPCService {
27 return &serviceClient{conn}
30 func (c *serviceClient) IPNeighborAddDel(ctx context.Context, in *IPNeighborAddDel) (*IPNeighborAddDelReply, error) {
31 out := new(IPNeighborAddDelReply)
32 err := c.conn.Invoke(ctx, in, out)
36 return out, api.RetvalToVPPApiError(out.Retval)
39 func (c *serviceClient) IPNeighborConfig(ctx context.Context, in *IPNeighborConfig) (*IPNeighborConfigReply, error) {
40 out := new(IPNeighborConfigReply)
41 err := c.conn.Invoke(ctx, in, out)
45 return out, api.RetvalToVPPApiError(out.Retval)
48 func (c *serviceClient) IPNeighborDump(ctx context.Context, in *IPNeighborDump) (RPCService_IPNeighborDumpClient, error) {
49 stream, err := c.conn.NewStream(ctx)
53 x := &serviceClient_IPNeighborDumpClient{stream}
54 if err := x.Stream.SendMsg(in); err != nil {
57 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
63 type RPCService_IPNeighborDumpClient interface {
64 Recv() (*IPNeighborDetails, error)
68 type serviceClient_IPNeighborDumpClient struct {
72 func (c *serviceClient_IPNeighborDumpClient) Recv() (*IPNeighborDetails, error) {
73 msg, err := c.Stream.RecvMsg()
77 switch m := msg.(type) {
78 case *IPNeighborDetails:
80 case *vpe.ControlPingReply:
81 err = c.Stream.Close()
87 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
91 func (c *serviceClient) WantIPNeighborEvents(ctx context.Context, in *WantIPNeighborEvents) (*WantIPNeighborEventsReply, error) {
92 out := new(WantIPNeighborEventsReply)
93 err := c.conn.Invoke(ctx, in, out)
97 return out, api.RetvalToVPPApiError(out.Retval)