diff options
author | mhalaj1 <matus.halaj@pantheon.tech> | 2021-08-26 13:10:48 +0200 |
---|---|---|
committer | mhalaj1 <matus.halaj@pantheon.tech> | 2021-08-26 13:10:48 +0200 |
commit | debc52dea8a81417bb08ca5bb934c7876b6d65e0 (patch) | |
tree | 23909430d78d6b77c2b414814e843708a6bab08e /binapi/vmxnet3/vmxnet3_rpc.ba.go | |
parent | c0da1f2999a6b08d003c0fed1a23e1ca60dd1571 (diff) |
regenerate binapi
Signed-off-by: mhalaj1 <matus.halaj@pantheon.tech>
Change-Id: I9bb6a5ca00aa542128bde0bfbbba7b57b9f16ed2
Diffstat (limited to 'binapi/vmxnet3/vmxnet3_rpc.ba.go')
-rw-r--r-- | binapi/vmxnet3/vmxnet3_rpc.ba.go | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/binapi/vmxnet3/vmxnet3_rpc.ba.go b/binapi/vmxnet3/vmxnet3_rpc.ba.go index a05819c..e8bcdc6 100644 --- a/binapi/vmxnet3/vmxnet3_rpc.ba.go +++ b/binapi/vmxnet3/vmxnet3_rpc.ba.go @@ -13,6 +13,7 @@ import ( // RPCService defines RPC service vmxnet3. type RPCService interface { + SwVmxnet3InterfaceDump(ctx context.Context, in *SwVmxnet3InterfaceDump) (RPCService_SwVmxnet3InterfaceDumpClient, error) Vmxnet3Create(ctx context.Context, in *Vmxnet3Create) (*Vmxnet3CreateReply, error) Vmxnet3Delete(ctx context.Context, in *Vmxnet3Delete) (*Vmxnet3DeleteReply, error) Vmxnet3Dump(ctx context.Context, in *Vmxnet3Dump) (RPCService_Vmxnet3DumpClient, error) @@ -26,6 +27,45 @@ func NewServiceClient(conn api.Connection) RPCService { return &serviceClient{conn} } +func (c *serviceClient) SwVmxnet3InterfaceDump(ctx context.Context, in *SwVmxnet3InterfaceDump) (RPCService_SwVmxnet3InterfaceDumpClient, error) { + stream, err := c.conn.NewStream(ctx) + if err != nil { + return nil, err + } + x := &serviceClient_SwVmxnet3InterfaceDumpClient{stream} + if err := x.Stream.SendMsg(in); err != nil { + return nil, err + } + if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + return nil, err + } + return x, nil +} + +type RPCService_SwVmxnet3InterfaceDumpClient interface { + Recv() (*SwVmxnet3InterfaceDetails, error) + api.Stream +} + +type serviceClient_SwVmxnet3InterfaceDumpClient struct { + api.Stream +} + +func (c *serviceClient_SwVmxnet3InterfaceDumpClient) Recv() (*SwVmxnet3InterfaceDetails, error) { + msg, err := c.Stream.RecvMsg() + if err != nil { + return nil, err + } + switch m := msg.(type) { + case *SwVmxnet3InterfaceDetails: + return m, nil + case *vpe.ControlPingReply: + return nil, io.EOF + default: + return nil, fmt.Errorf("unexpected message: %T %v", m, m) + } +} + func (c *serviceClient) Vmxnet3Create(ctx context.Context, in *Vmxnet3Create) (*Vmxnet3CreateReply, error) { out := new(Vmxnet3CreateReply) err := c.conn.Invoke(ctx, in, out) |