Fix codec fallback and generate type imports
[govpp.git] / codec / testdata / binapi2001 / memclnt / memclnt_rpc.ba.go
diff --git a/codec/testdata/binapi2001/memclnt/memclnt_rpc.ba.go b/codec/testdata/binapi2001/memclnt/memclnt_rpc.ba.go
new file mode 100644 (file)
index 0000000..05dfc28
--- /dev/null
@@ -0,0 +1,141 @@
+// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
+
+package memclnt
+
+import (
+       "context"
+       "io"
+
+       api "git.fd.io/govpp.git/api"
+)
+
+// RPCService represents RPC service API for memclnt module.
+type RPCService interface {
+       APIVersions(ctx context.Context, in *APIVersions) (*APIVersionsReply, error)
+       GetFirstMsgID(ctx context.Context, in *GetFirstMsgID) (*GetFirstMsgIDReply, error)
+       MemclntCreate(ctx context.Context, in *MemclntCreate) (*MemclntCreateReply, error)
+       MemclntDelete(ctx context.Context, in *MemclntDelete) (*MemclntDeleteReply, error)
+       MemclntKeepalive(ctx context.Context, in *MemclntKeepalive) (*MemclntKeepaliveReply, error)
+       MemclntReadTimeout(ctx context.Context, in *MemclntReadTimeout) error
+       MemclntRxThreadSuspend(ctx context.Context, in *MemclntRxThreadSuspend) error
+       RPCCall(ctx context.Context, in *RPCCall) (*RPCCallReply, error)
+       RxThreadExit(ctx context.Context, in *RxThreadExit) error
+       SockInitShm(ctx context.Context, in *SockInitShm) (*SockInitShmReply, error)
+       SockclntCreate(ctx context.Context, in *SockclntCreate) (*SockclntCreateReply, error)
+       SockclntDelete(ctx context.Context, in *SockclntDelete) (*SockclntDeleteReply, error)
+       TracePluginMsgIds(ctx context.Context, in *TracePluginMsgIds) error
+}
+
+type serviceClient struct {
+       ch api.Channel
+}
+
+func NewServiceClient(ch api.Channel) RPCService {
+       return &serviceClient{ch}
+}
+
+func (c *serviceClient) APIVersions(ctx context.Context, in *APIVersions) (*APIVersionsReply, error) {
+       out := new(APIVersionsReply)
+       err := c.ch.SendRequest(in).ReceiveReply(out)
+       if err != nil {
+               return nil, err
+       }
+       return out, nil
+}
+
+func (c *serviceClient) GetFirstMsgID(ctx context.Context, in *GetFirstMsgID) (*GetFirstMsgIDReply, error) {
+       out := new(GetFirstMsgIDReply)
+       err := c.ch.SendRequest(in).ReceiveReply(out)
+       if err != nil {
+               return nil, err
+       }
+       return out, nil
+}
+
+func (c *serviceClient) MemclntCreate(ctx context.Context, in *MemclntCreate) (*MemclntCreateReply, error) {
+       out := new(MemclntCreateReply)
+       err := c.ch.SendRequest(in).ReceiveReply(out)
+       if err != nil {
+               return nil, err
+       }
+       return out, nil
+}
+
+func (c *serviceClient) MemclntDelete(ctx context.Context, in *MemclntDelete) (*MemclntDeleteReply, error) {
+       out := new(MemclntDeleteReply)
+       err := c.ch.SendRequest(in).ReceiveReply(out)
+       if err != nil {
+               return nil, err
+       }
+       return out, nil
+}
+
+func (c *serviceClient) MemclntKeepalive(ctx context.Context, in *MemclntKeepalive) (*MemclntKeepaliveReply, error) {
+       out := new(MemclntKeepaliveReply)
+       err := c.ch.SendRequest(in).ReceiveReply(out)
+       if err != nil {
+               return nil, err
+       }
+       return out, nil
+}
+
+func (c *serviceClient) MemclntReadTimeout(ctx context.Context, in *MemclntReadTimeout) error {
+       c.ch.SendRequest(in)
+       return nil
+}
+
+func (c *serviceClient) MemclntRxThreadSuspend(ctx context.Context, in *MemclntRxThreadSuspend) error {
+       c.ch.SendRequest(in)
+       return nil
+}
+
+func (c *serviceClient) RPCCall(ctx context.Context, in *RPCCall) (*RPCCallReply, error) {
+       out := new(RPCCallReply)
+       err := c.ch.SendRequest(in).ReceiveReply(out)
+       if err != nil {
+               return nil, err
+       }
+       return out, nil
+}
+
+func (c *serviceClient) RxThreadExit(ctx context.Context, in *RxThreadExit) error {
+       c.ch.SendRequest(in)
+       return nil
+}
+
+func (c *serviceClient) SockInitShm(ctx context.Context, in *SockInitShm) (*SockInitShmReply, error) {
+       out := new(SockInitShmReply)
+       err := c.ch.SendRequest(in).ReceiveReply(out)
+       if err != nil {
+               return nil, err
+       }
+       return out, nil
+}
+
+func (c *serviceClient) SockclntCreate(ctx context.Context, in *SockclntCreate) (*SockclntCreateReply, error) {
+       out := new(SockclntCreateReply)
+       err := c.ch.SendRequest(in).ReceiveReply(out)
+       if err != nil {
+               return nil, err
+       }
+       return out, nil
+}
+
+func (c *serviceClient) SockclntDelete(ctx context.Context, in *SockclntDelete) (*SockclntDeleteReply, error) {
+       out := new(SockclntDeleteReply)
+       err := c.ch.SendRequest(in).ReceiveReply(out)
+       if err != nil {
+               return nil, err
+       }
+       return out, nil
+}
+
+func (c *serviceClient) TracePluginMsgIds(ctx context.Context, in *TracePluginMsgIds) error {
+       c.ch.SendRequest(in)
+       return nil
+}
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = api.RegisterMessage
+var _ = context.Background
+var _ = io.Copy