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)
25 type serviceClient struct {
29 func NewServiceClient(conn api.Connection) RPCService {
30 return &serviceClient{conn}
33 func (c *serviceClient) VrrpVrAddDel(ctx context.Context, in *VrrpVrAddDel) (*VrrpVrAddDelReply, error) {
34 out := new(VrrpVrAddDelReply)
35 err := c.conn.Invoke(ctx, in, out)
39 return out, api.RetvalToVPPApiError(out.Retval)
42 func (c *serviceClient) VrrpVrDump(ctx context.Context, in *VrrpVrDump) (RPCService_VrrpVrDumpClient, error) {
43 stream, err := c.conn.NewStream(ctx)
47 x := &serviceClient_VrrpVrDumpClient{stream}
48 if err := x.Stream.SendMsg(in); err != nil {
51 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
57 type RPCService_VrrpVrDumpClient interface {
58 Recv() (*VrrpVrDetails, error)
62 type serviceClient_VrrpVrDumpClient struct {
66 func (c *serviceClient_VrrpVrDumpClient) Recv() (*VrrpVrDetails, error) {
67 msg, err := c.Stream.RecvMsg()
71 switch m := msg.(type) {
74 case *vpe.ControlPingReply:
77 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
81 func (c *serviceClient) VrrpVrPeerDump(ctx context.Context, in *VrrpVrPeerDump) (RPCService_VrrpVrPeerDumpClient, error) {
82 stream, err := c.conn.NewStream(ctx)
86 x := &serviceClient_VrrpVrPeerDumpClient{stream}
87 if err := x.Stream.SendMsg(in); err != nil {
90 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
96 type RPCService_VrrpVrPeerDumpClient interface {
97 Recv() (*VrrpVrPeerDetails, error)
101 type serviceClient_VrrpVrPeerDumpClient struct {
105 func (c *serviceClient_VrrpVrPeerDumpClient) Recv() (*VrrpVrPeerDetails, error) {
106 msg, err := c.Stream.RecvMsg()
110 switch m := msg.(type) {
111 case *VrrpVrPeerDetails:
113 case *vpe.ControlPingReply:
116 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
120 func (c *serviceClient) VrrpVrSetPeers(ctx context.Context, in *VrrpVrSetPeers) (*VrrpVrSetPeersReply, error) {
121 out := new(VrrpVrSetPeersReply)
122 err := c.conn.Invoke(ctx, in, out)
126 return out, api.RetvalToVPPApiError(out.Retval)
129 func (c *serviceClient) VrrpVrStartStop(ctx context.Context, in *VrrpVrStartStop) (*VrrpVrStartStopReply, error) {
130 out := new(VrrpVrStartStopReply)
131 err := c.conn.Invoke(ctx, in, out)
135 return out, api.RetvalToVPPApiError(out.Retval)
138 func (c *serviceClient) VrrpVrTrackIfAddDel(ctx context.Context, in *VrrpVrTrackIfAddDel) (*VrrpVrTrackIfAddDelReply, error) {
139 out := new(VrrpVrTrackIfAddDelReply)
140 err := c.conn.Invoke(ctx, in, out)
144 return out, api.RetvalToVPPApiError(out.Retval)
147 func (c *serviceClient) VrrpVrTrackIfDump(ctx context.Context, in *VrrpVrTrackIfDump) (RPCService_VrrpVrTrackIfDumpClient, error) {
148 stream, err := c.conn.NewStream(ctx)
152 x := &serviceClient_VrrpVrTrackIfDumpClient{stream}
153 if err := x.Stream.SendMsg(in); err != nil {
156 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
162 type RPCService_VrrpVrTrackIfDumpClient interface {
163 Recv() (*VrrpVrTrackIfDetails, error)
167 type serviceClient_VrrpVrTrackIfDumpClient struct {
171 func (c *serviceClient_VrrpVrTrackIfDumpClient) Recv() (*VrrpVrTrackIfDetails, error) {
172 msg, err := c.Stream.RecvMsg()
176 switch m := msg.(type) {
177 case *VrrpVrTrackIfDetails:
179 case *vpe.ControlPingReply:
182 return nil, fmt.Errorf("unexpected message: %T %v", m, m)