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 vrrp.
15 type RPCService interface {
16 VrrpVrAddDel(ctx context.Context, in *VrrpVrAddDel) (*VrrpVrAddDelReply, error)
17 VrrpVrDump(ctx context.Context, in *VrrpVrDump) (RPCService_VrrpVrDumpClient, error)
18 VrrpVrPeerDump(ctx context.Context, in *VrrpVrPeerDump) (RPCService_VrrpVrPeerDumpClient, error)
19 VrrpVrSetPeers(ctx context.Context, in *VrrpVrSetPeers) (*VrrpVrSetPeersReply, error)
20 VrrpVrStartStop(ctx context.Context, in *VrrpVrStartStop) (*VrrpVrStartStopReply, error)
21 VrrpVrTrackIfAddDel(ctx context.Context, in *VrrpVrTrackIfAddDel) (*VrrpVrTrackIfAddDelReply, error)
22 VrrpVrTrackIfDump(ctx context.Context, in *VrrpVrTrackIfDump) (RPCService_VrrpVrTrackIfDumpClient, error)
23 WantVrrpVrEvents(ctx context.Context, in *WantVrrpVrEvents) (*WantVrrpVrEventsReply, error)
26 type serviceClient struct {
30 func NewServiceClient(conn api.Connection) RPCService {
31 return &serviceClient{conn}
34 func (c *serviceClient) VrrpVrAddDel(ctx context.Context, in *VrrpVrAddDel) (*VrrpVrAddDelReply, error) {
35 out := new(VrrpVrAddDelReply)
36 err := c.conn.Invoke(ctx, in, out)
40 return out, api.RetvalToVPPApiError(out.Retval)
43 func (c *serviceClient) VrrpVrDump(ctx context.Context, in *VrrpVrDump) (RPCService_VrrpVrDumpClient, error) {
44 stream, err := c.conn.NewStream(ctx)
48 x := &serviceClient_VrrpVrDumpClient{stream}
49 if err := x.Stream.SendMsg(in); err != nil {
52 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
58 type RPCService_VrrpVrDumpClient interface {
59 Recv() (*VrrpVrDetails, error)
63 type serviceClient_VrrpVrDumpClient struct {
67 func (c *serviceClient_VrrpVrDumpClient) Recv() (*VrrpVrDetails, error) {
68 msg, err := c.Stream.RecvMsg()
72 switch m := msg.(type) {
75 case *vpe.ControlPingReply:
78 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
82 func (c *serviceClient) VrrpVrPeerDump(ctx context.Context, in *VrrpVrPeerDump) (RPCService_VrrpVrPeerDumpClient, error) {
83 stream, err := c.conn.NewStream(ctx)
87 x := &serviceClient_VrrpVrPeerDumpClient{stream}
88 if err := x.Stream.SendMsg(in); err != nil {
91 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
97 type RPCService_VrrpVrPeerDumpClient interface {
98 Recv() (*VrrpVrPeerDetails, error)
102 type serviceClient_VrrpVrPeerDumpClient struct {
106 func (c *serviceClient_VrrpVrPeerDumpClient) Recv() (*VrrpVrPeerDetails, error) {
107 msg, err := c.Stream.RecvMsg()
111 switch m := msg.(type) {
112 case *VrrpVrPeerDetails:
114 case *vpe.ControlPingReply:
117 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
121 func (c *serviceClient) VrrpVrSetPeers(ctx context.Context, in *VrrpVrSetPeers) (*VrrpVrSetPeersReply, error) {
122 out := new(VrrpVrSetPeersReply)
123 err := c.conn.Invoke(ctx, in, out)
127 return out, api.RetvalToVPPApiError(out.Retval)
130 func (c *serviceClient) VrrpVrStartStop(ctx context.Context, in *VrrpVrStartStop) (*VrrpVrStartStopReply, error) {
131 out := new(VrrpVrStartStopReply)
132 err := c.conn.Invoke(ctx, in, out)
136 return out, api.RetvalToVPPApiError(out.Retval)
139 func (c *serviceClient) VrrpVrTrackIfAddDel(ctx context.Context, in *VrrpVrTrackIfAddDel) (*VrrpVrTrackIfAddDelReply, error) {
140 out := new(VrrpVrTrackIfAddDelReply)
141 err := c.conn.Invoke(ctx, in, out)
145 return out, api.RetvalToVPPApiError(out.Retval)
148 func (c *serviceClient) VrrpVrTrackIfDump(ctx context.Context, in *VrrpVrTrackIfDump) (RPCService_VrrpVrTrackIfDumpClient, error) {
149 stream, err := c.conn.NewStream(ctx)
153 x := &serviceClient_VrrpVrTrackIfDumpClient{stream}
154 if err := x.Stream.SendMsg(in); err != nil {
157 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
163 type RPCService_VrrpVrTrackIfDumpClient interface {
164 Recv() (*VrrpVrTrackIfDetails, error)
168 type serviceClient_VrrpVrTrackIfDumpClient struct {
172 func (c *serviceClient_VrrpVrTrackIfDumpClient) Recv() (*VrrpVrTrackIfDetails, error) {
173 msg, err := c.Stream.RecvMsg()
177 switch m := msg.(type) {
178 case *VrrpVrTrackIfDetails:
180 case *vpe.ControlPingReply:
183 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
187 func (c *serviceClient) WantVrrpVrEvents(ctx context.Context, in *WantVrrpVrEvents) (*WantVrrpVrEventsReply, error) {
188 out := new(WantVrrpVrEventsReply)
189 err := c.conn.Invoke(ctx, in, out)
193 return out, api.RetvalToVPPApiError(out.Retval)