aboutsummaryrefslogtreecommitdiffstats
path: root/internal/testbinapi/binapi2001/memclnt/memclnt_rpc.ba.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/testbinapi/binapi2001/memclnt/memclnt_rpc.ba.go')
-rw-r--r--internal/testbinapi/binapi2001/memclnt/memclnt_rpc.ba.go69
1 files changed, 45 insertions, 24 deletions
diff --git a/internal/testbinapi/binapi2001/memclnt/memclnt_rpc.ba.go b/internal/testbinapi/binapi2001/memclnt/memclnt_rpc.ba.go
index 05dfc28..ec60156 100644
--- a/internal/testbinapi/binapi2001/memclnt/memclnt_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/memclnt/memclnt_rpc.ba.go
@@ -4,12 +4,10 @@ package memclnt
import (
"context"
- "io"
-
api "git.fd.io/govpp.git/api"
)
-// RPCService represents RPC service API for memclnt module.
+// RPCService defines RPC service memclnt.
type RPCService interface {
APIVersions(ctx context.Context, in *APIVersions) (*APIVersionsReply, error)
GetFirstMsgID(ctx context.Context, in *GetFirstMsgID) (*GetFirstMsgIDReply, error)
@@ -27,16 +25,16 @@ type RPCService interface {
}
type serviceClient struct {
- ch api.Channel
+ conn api.Connection
}
-func NewServiceClient(ch api.Channel) RPCService {
- return &serviceClient{ch}
+func NewServiceClient(conn api.Connection) RPCService {
+ return &serviceClient{conn}
}
func (c *serviceClient) APIVersions(ctx context.Context, in *APIVersions) (*APIVersionsReply, error) {
out := new(APIVersionsReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
+ err := c.conn.Invoke(ctx, in, out)
if err != nil {
return nil, err
}
@@ -45,7 +43,7 @@ func (c *serviceClient) APIVersions(ctx context.Context, in *APIVersions) (*APIV
func (c *serviceClient) GetFirstMsgID(ctx context.Context, in *GetFirstMsgID) (*GetFirstMsgIDReply, error) {
out := new(GetFirstMsgIDReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
+ err := c.conn.Invoke(ctx, in, out)
if err != nil {
return nil, err
}
@@ -54,7 +52,7 @@ func (c *serviceClient) GetFirstMsgID(ctx context.Context, in *GetFirstMsgID) (*
func (c *serviceClient) MemclntCreate(ctx context.Context, in *MemclntCreate) (*MemclntCreateReply, error) {
out := new(MemclntCreateReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
+ err := c.conn.Invoke(ctx, in, out)
if err != nil {
return nil, err
}
@@ -63,7 +61,7 @@ func (c *serviceClient) MemclntCreate(ctx context.Context, in *MemclntCreate) (*
func (c *serviceClient) MemclntDelete(ctx context.Context, in *MemclntDelete) (*MemclntDeleteReply, error) {
out := new(MemclntDeleteReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
+ err := c.conn.Invoke(ctx, in, out)
if err != nil {
return nil, err
}
@@ -72,7 +70,7 @@ func (c *serviceClient) MemclntDelete(ctx context.Context, in *MemclntDelete) (*
func (c *serviceClient) MemclntKeepalive(ctx context.Context, in *MemclntKeepalive) (*MemclntKeepaliveReply, error) {
out := new(MemclntKeepaliveReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
+ err := c.conn.Invoke(ctx, in, out)
if err != nil {
return nil, err
}
@@ -80,18 +78,32 @@ func (c *serviceClient) MemclntKeepalive(ctx context.Context, in *MemclntKeepali
}
func (c *serviceClient) MemclntReadTimeout(ctx context.Context, in *MemclntReadTimeout) error {
- c.ch.SendRequest(in)
+ stream, err := c.conn.NewStream(ctx)
+ if err != nil {
+ return err
+ }
+ err = stream.SendMsg(in)
+ if err != nil {
+ return err
+ }
return nil
}
func (c *serviceClient) MemclntRxThreadSuspend(ctx context.Context, in *MemclntRxThreadSuspend) error {
- c.ch.SendRequest(in)
+ stream, err := c.conn.NewStream(ctx)
+ if err != nil {
+ return err
+ }
+ err = stream.SendMsg(in)
+ if err != nil {
+ return err
+ }
return nil
}
func (c *serviceClient) RPCCall(ctx context.Context, in *RPCCall) (*RPCCallReply, error) {
out := new(RPCCallReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
+ err := c.conn.Invoke(ctx, in, out)
if err != nil {
return nil, err
}
@@ -99,13 +111,20 @@ func (c *serviceClient) RPCCall(ctx context.Context, in *RPCCall) (*RPCCallReply
}
func (c *serviceClient) RxThreadExit(ctx context.Context, in *RxThreadExit) error {
- c.ch.SendRequest(in)
+ stream, err := c.conn.NewStream(ctx)
+ if err != nil {
+ return err
+ }
+ err = stream.SendMsg(in)
+ if err != nil {
+ return err
+ }
return nil
}
func (c *serviceClient) SockInitShm(ctx context.Context, in *SockInitShm) (*SockInitShmReply, error) {
out := new(SockInitShmReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
+ err := c.conn.Invoke(ctx, in, out)
if err != nil {
return nil, err
}
@@ -114,7 +133,7 @@ func (c *serviceClient) SockInitShm(ctx context.Context, in *SockInitShm) (*Sock
func (c *serviceClient) SockclntCreate(ctx context.Context, in *SockclntCreate) (*SockclntCreateReply, error) {
out := new(SockclntCreateReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
+ err := c.conn.Invoke(ctx, in, out)
if err != nil {
return nil, err
}
@@ -123,7 +142,7 @@ func (c *serviceClient) SockclntCreate(ctx context.Context, in *SockclntCreate)
func (c *serviceClient) SockclntDelete(ctx context.Context, in *SockclntDelete) (*SockclntDeleteReply, error) {
out := new(SockclntDeleteReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
+ err := c.conn.Invoke(ctx, in, out)
if err != nil {
return nil, err
}
@@ -131,11 +150,13 @@ func (c *serviceClient) SockclntDelete(ctx context.Context, in *SockclntDelete)
}
func (c *serviceClient) TracePluginMsgIds(ctx context.Context, in *TracePluginMsgIds) error {
- c.ch.SendRequest(in)
+ stream, err := c.conn.NewStream(ctx)
+ if err != nil {
+ return err
+ }
+ err = stream.SendMsg(in)
+ if err != nil {
+ return err
+ }
return nil
}
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = api.RegisterMessage
-var _ = context.Background
-var _ = io.Copy