summaryrefslogtreecommitdiffstats
path: root/internal/testbinapi/binapi2001/memclnt/memclnt_rpc.ba.go
diff options
context:
space:
mode:
authorOndrej Fabry <ofabry@cisco.com>2020-07-17 10:36:28 +0200
committerOndrej Fabry <ofabry@cisco.com>2020-07-17 11:43:41 +0200
commitd1f24d37bd447b64e402298bb8eb2479681facf9 (patch)
treea3fc21ba730a91d8a402c7a5bf9c614e3677c4fc /internal/testbinapi/binapi2001/memclnt/memclnt_rpc.ba.go
parent1548c7e12531e3d055567d761c580a1c7ff0ac40 (diff)
Improve binapi generator
- simplified Size/Marshal/Unmarshal methods - replace struc in unions with custom marshal/unmarshal - fix imports in generated files - fix mock adapter - generate rpc service using low-level stream API (dumps generate control ping or stream msg..) - move examples/binapi to binapi and generate all API for latest release - add binapigen.Plugin for developing custom generator plugins - optionally generate HTTP handlers (REST API) for RPC services - add govpp program for browsing VPP API Change-Id: I092e9ed2b0c17972b3476463c3d4b14dd76ed42b Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Diffstat (limited to 'internal/testbinapi/binapi2001/memclnt/memclnt_rpc.ba.go')
-rw-r--r--internal/testbinapi/binapi2001/memclnt/memclnt_rpc.ba.go141
1 files changed, 141 insertions, 0 deletions
diff --git a/internal/testbinapi/binapi2001/memclnt/memclnt_rpc.ba.go b/internal/testbinapi/binapi2001/memclnt/memclnt_rpc.ba.go
new file mode 100644
index 0000000..05dfc28
--- /dev/null
+++ b/internal/testbinapi/binapi2001/memclnt/memclnt_rpc.ba.go
@@ -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