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 lb.
14 type RPCService interface {
15 LbAddDelAs(ctx context.Context, in *LbAddDelAs) (*LbAddDelAsReply, error)
16 LbAddDelIntfNat4(ctx context.Context, in *LbAddDelIntfNat4) (*LbAddDelIntfNat4Reply, error)
17 LbAddDelIntfNat6(ctx context.Context, in *LbAddDelIntfNat6) (*LbAddDelIntfNat6Reply, error)
18 LbAddDelVip(ctx context.Context, in *LbAddDelVip) (*LbAddDelVipReply, error)
19 LbAsDump(ctx context.Context, in *LbAsDump) (RPCService_LbAsDumpClient, error)
20 LbConf(ctx context.Context, in *LbConf) (*LbConfReply, error)
21 LbFlushVip(ctx context.Context, in *LbFlushVip) (*LbFlushVipReply, error)
22 LbVipDump(ctx context.Context, in *LbVipDump) (RPCService_LbVipDumpClient, error)
25 type serviceClient struct {
29 func NewServiceClient(conn api.Connection) RPCService {
30 return &serviceClient{conn}
33 func (c *serviceClient) LbAddDelAs(ctx context.Context, in *LbAddDelAs) (*LbAddDelAsReply, error) {
34 out := new(LbAddDelAsReply)
35 err := c.conn.Invoke(ctx, in, out)
42 func (c *serviceClient) LbAddDelIntfNat4(ctx context.Context, in *LbAddDelIntfNat4) (*LbAddDelIntfNat4Reply, error) {
43 out := new(LbAddDelIntfNat4Reply)
44 err := c.conn.Invoke(ctx, in, out)
51 func (c *serviceClient) LbAddDelIntfNat6(ctx context.Context, in *LbAddDelIntfNat6) (*LbAddDelIntfNat6Reply, error) {
52 out := new(LbAddDelIntfNat6Reply)
53 err := c.conn.Invoke(ctx, in, out)
60 func (c *serviceClient) LbAddDelVip(ctx context.Context, in *LbAddDelVip) (*LbAddDelVipReply, error) {
61 out := new(LbAddDelVipReply)
62 err := c.conn.Invoke(ctx, in, out)
69 func (c *serviceClient) LbAsDump(ctx context.Context, in *LbAsDump) (RPCService_LbAsDumpClient, error) {
70 stream, err := c.conn.NewStream(ctx)
74 x := &serviceClient_LbAsDumpClient{stream}
75 if err := x.Stream.SendMsg(in); err != nil {
78 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
84 type RPCService_LbAsDumpClient interface {
85 Recv() (*LbAsDetails, error)
89 type serviceClient_LbAsDumpClient struct {
93 func (c *serviceClient_LbAsDumpClient) Recv() (*LbAsDetails, error) {
94 msg, err := c.Stream.RecvMsg()
98 switch m := msg.(type) {
101 case *vpe.ControlPingReply:
104 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
108 func (c *serviceClient) LbConf(ctx context.Context, in *LbConf) (*LbConfReply, error) {
109 out := new(LbConfReply)
110 err := c.conn.Invoke(ctx, in, out)
117 func (c *serviceClient) LbFlushVip(ctx context.Context, in *LbFlushVip) (*LbFlushVipReply, error) {
118 out := new(LbFlushVipReply)
119 err := c.conn.Invoke(ctx, in, out)
126 func (c *serviceClient) LbVipDump(ctx context.Context, in *LbVipDump) (RPCService_LbVipDumpClient, error) {
127 stream, err := c.conn.NewStream(ctx)
131 x := &serviceClient_LbVipDumpClient{stream}
132 if err := x.Stream.SendMsg(in); err != nil {
135 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
141 type RPCService_LbVipDumpClient interface {
142 Recv() (*LbVipDetails, error)
146 type serviceClient_LbVipDumpClient struct {
150 func (c *serviceClient_LbVipDumpClient) Recv() (*LbVipDetails, error) {
151 msg, err := c.Stream.RecvMsg()
155 switch m := msg.(type) {
158 case *vpe.ControlPingReply:
161 return nil, fmt.Errorf("unexpected message: %T %v", m, m)