1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
8 api "git.fd.io/govpp.git/api"
9 vpe "git.fd.io/govpp.git/binapi/vpe"
13 // RPCService defines RPC service vrrp.
14 type RPCService interface {
15 VrrpVrAddDel(ctx context.Context, in *VrrpVrAddDel) (*VrrpVrAddDelReply, error)
16 VrrpVrDump(ctx context.Context, in *VrrpVrDump) (RPCService_VrrpVrDumpClient, error)
17 VrrpVrPeerDump(ctx context.Context, in *VrrpVrPeerDump) (RPCService_VrrpVrPeerDumpClient, error)
18 VrrpVrSetPeers(ctx context.Context, in *VrrpVrSetPeers) (*VrrpVrSetPeersReply, error)
19 VrrpVrStartStop(ctx context.Context, in *VrrpVrStartStop) (*VrrpVrStartStopReply, error)
20 VrrpVrTrackIfAddDel(ctx context.Context, in *VrrpVrTrackIfAddDel) (*VrrpVrTrackIfAddDelReply, error)
21 VrrpVrTrackIfDump(ctx context.Context, in *VrrpVrTrackIfDump) (RPCService_VrrpVrTrackIfDumpClient, error)
24 type serviceClient struct {
28 func NewServiceClient(conn api.Connection) RPCService {
29 return &serviceClient{conn}
32 func (c *serviceClient) VrrpVrAddDel(ctx context.Context, in *VrrpVrAddDel) (*VrrpVrAddDelReply, error) {
33 out := new(VrrpVrAddDelReply)
34 err := c.conn.Invoke(ctx, in, out)
41 func (c *serviceClient) VrrpVrDump(ctx context.Context, in *VrrpVrDump) (RPCService_VrrpVrDumpClient, error) {
42 stream, err := c.conn.NewStream(ctx)
46 x := &serviceClient_VrrpVrDumpClient{stream}
47 if err := x.Stream.SendMsg(in); err != nil {
50 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
56 type RPCService_VrrpVrDumpClient interface {
57 Recv() (*VrrpVrDetails, error)
61 type serviceClient_VrrpVrDumpClient struct {
65 func (c *serviceClient_VrrpVrDumpClient) Recv() (*VrrpVrDetails, error) {
66 msg, err := c.Stream.RecvMsg()
70 switch m := msg.(type) {
73 case *vpe.ControlPingReply:
76 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
80 func (c *serviceClient) VrrpVrPeerDump(ctx context.Context, in *VrrpVrPeerDump) (RPCService_VrrpVrPeerDumpClient, error) {
81 stream, err := c.conn.NewStream(ctx)
85 x := &serviceClient_VrrpVrPeerDumpClient{stream}
86 if err := x.Stream.SendMsg(in); err != nil {
89 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
95 type RPCService_VrrpVrPeerDumpClient interface {
96 Recv() (*VrrpVrPeerDetails, error)
100 type serviceClient_VrrpVrPeerDumpClient struct {
104 func (c *serviceClient_VrrpVrPeerDumpClient) Recv() (*VrrpVrPeerDetails, error) {
105 msg, err := c.Stream.RecvMsg()
109 switch m := msg.(type) {
110 case *VrrpVrPeerDetails:
112 case *vpe.ControlPingReply:
115 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
119 func (c *serviceClient) VrrpVrSetPeers(ctx context.Context, in *VrrpVrSetPeers) (*VrrpVrSetPeersReply, error) {
120 out := new(VrrpVrSetPeersReply)
121 err := c.conn.Invoke(ctx, in, out)
128 func (c *serviceClient) VrrpVrStartStop(ctx context.Context, in *VrrpVrStartStop) (*VrrpVrStartStopReply, error) {
129 out := new(VrrpVrStartStopReply)
130 err := c.conn.Invoke(ctx, in, out)
137 func (c *serviceClient) VrrpVrTrackIfAddDel(ctx context.Context, in *VrrpVrTrackIfAddDel) (*VrrpVrTrackIfAddDelReply, error) {
138 out := new(VrrpVrTrackIfAddDelReply)
139 err := c.conn.Invoke(ctx, in, out)
146 func (c *serviceClient) VrrpVrTrackIfDump(ctx context.Context, in *VrrpVrTrackIfDump) (RPCService_VrrpVrTrackIfDumpClient, error) {
147 stream, err := c.conn.NewStream(ctx)
151 x := &serviceClient_VrrpVrTrackIfDumpClient{stream}
152 if err := x.Stream.SendMsg(in); err != nil {
155 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
161 type RPCService_VrrpVrTrackIfDumpClient interface {
162 Recv() (*VrrpVrTrackIfDetails, error)
166 type serviceClient_VrrpVrTrackIfDumpClient struct {
170 func (c *serviceClient_VrrpVrTrackIfDumpClient) Recv() (*VrrpVrTrackIfDetails, error) {
171 msg, err := c.Stream.RecvMsg()
175 switch m := msg.(type) {
176 case *VrrpVrTrackIfDetails:
178 case *vpe.ControlPingReply:
181 return nil, fmt.Errorf("unexpected message: %T %v", m, m)