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 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(&vpe.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 *vpe.ControlPingReply:
74 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
78 func (c *serviceClient) ProxyArpIntfcDump(ctx context.Context, in *ProxyArpIntfcDump) (RPCService_ProxyArpIntfcDumpClient, error) {
79 stream, err := c.conn.NewStream(ctx)
83 x := &serviceClient_ProxyArpIntfcDumpClient{stream}
84 if err := x.Stream.SendMsg(in); err != nil {
87 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
93 type RPCService_ProxyArpIntfcDumpClient interface {
94 Recv() (*ProxyArpIntfcDetails, error)
98 type serviceClient_ProxyArpIntfcDumpClient struct {
102 func (c *serviceClient_ProxyArpIntfcDumpClient) Recv() (*ProxyArpIntfcDetails, error) {
103 msg, err := c.Stream.RecvMsg()
107 switch m := msg.(type) {
108 case *ProxyArpIntfcDetails:
110 case *vpe.ControlPingReply:
113 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
117 func (c *serviceClient) ProxyArpIntfcEnableDisable(ctx context.Context, in *ProxyArpIntfcEnableDisable) (*ProxyArpIntfcEnableDisableReply, error) {
118 out := new(ProxyArpIntfcEnableDisableReply)
119 err := c.conn.Invoke(ctx, in, out)
123 return out, api.RetvalToVPPApiError(out.Retval)