1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
10 api "go.fd.io/govpp/api"
11 memclnt "go.fd.io/govpp/binapi/memclnt"
14 // RPCService defines RPC service arp.
15 type RPCService interface {
16 ProxyArpAddDel(ctx context.Context, in *ProxyArpAddDel) (*ProxyArpAddDelReply, error)
17 ProxyArpDump(ctx context.Context, in *ProxyArpDump) (RPCService_ProxyArpDumpClient, error)
18 ProxyArpIntfcDump(ctx context.Context, in *ProxyArpIntfcDump) (RPCService_ProxyArpIntfcDumpClient, error)
19 ProxyArpIntfcEnableDisable(ctx context.Context, in *ProxyArpIntfcEnableDisable) (*ProxyArpIntfcEnableDisableReply, error)
22 type serviceClient struct {
26 func NewServiceClient(conn api.Connection) RPCService {
27 return &serviceClient{conn}
30 func (c *serviceClient) ProxyArpAddDel(ctx context.Context, in *ProxyArpAddDel) (*ProxyArpAddDelReply, error) {
31 out := new(ProxyArpAddDelReply)
32 err := c.conn.Invoke(ctx, in, out)
36 return out, api.RetvalToVPPApiError(out.Retval)
39 func (c *serviceClient) ProxyArpDump(ctx context.Context, in *ProxyArpDump) (RPCService_ProxyArpDumpClient, error) {
40 stream, err := c.conn.NewStream(ctx)
44 x := &serviceClient_ProxyArpDumpClient{stream}
45 if err := x.Stream.SendMsg(in); err != nil {
48 if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
54 type RPCService_ProxyArpDumpClient interface {
55 Recv() (*ProxyArpDetails, error)
59 type serviceClient_ProxyArpDumpClient struct {
63 func (c *serviceClient_ProxyArpDumpClient) Recv() (*ProxyArpDetails, error) {
64 msg, err := c.Stream.RecvMsg()
68 switch m := msg.(type) {
69 case *ProxyArpDetails:
71 case *memclnt.ControlPingReply:
72 err = c.Stream.Close()
78 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
82 func (c *serviceClient) ProxyArpIntfcDump(ctx context.Context, in *ProxyArpIntfcDump) (RPCService_ProxyArpIntfcDumpClient, error) {
83 stream, err := c.conn.NewStream(ctx)
87 x := &serviceClient_ProxyArpIntfcDumpClient{stream}
88 if err := x.Stream.SendMsg(in); err != nil {
91 if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
97 type RPCService_ProxyArpIntfcDumpClient interface {
98 Recv() (*ProxyArpIntfcDetails, error)
102 type serviceClient_ProxyArpIntfcDumpClient struct {
106 func (c *serviceClient_ProxyArpIntfcDumpClient) Recv() (*ProxyArpIntfcDetails, error) {
107 msg, err := c.Stream.RecvMsg()
111 switch m := msg.(type) {
112 case *ProxyArpIntfcDetails:
114 case *memclnt.ControlPingReply:
115 err = c.Stream.Close()
121 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
125 func (c *serviceClient) ProxyArpIntfcEnableDisable(ctx context.Context, in *ProxyArpIntfcEnableDisable) (*ProxyArpIntfcEnableDisableReply, error) {
126 out := new(ProxyArpIntfcEnableDisableReply)
127 err := c.conn.Invoke(ctx, in, out)
131 return out, api.RetvalToVPPApiError(out.Retval)