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/internal/testbinapi/binapi2001/vpe"
13 // RPCService defines RPC service vhost_user.
14 type RPCService interface {
15 CreateVhostUserIf(ctx context.Context, in *CreateVhostUserIf) (*CreateVhostUserIfReply, error)
16 DeleteVhostUserIf(ctx context.Context, in *DeleteVhostUserIf) (*DeleteVhostUserIfReply, error)
17 ModifyVhostUserIf(ctx context.Context, in *ModifyVhostUserIf) (*ModifyVhostUserIfReply, error)
18 SwInterfaceVhostUserDump(ctx context.Context, in *SwInterfaceVhostUserDump) (RPCService_SwInterfaceVhostUserDumpClient, error)
21 type serviceClient struct {
25 func NewServiceClient(conn api.Connection) RPCService {
26 return &serviceClient{conn}
29 func (c *serviceClient) CreateVhostUserIf(ctx context.Context, in *CreateVhostUserIf) (*CreateVhostUserIfReply, error) {
30 out := new(CreateVhostUserIfReply)
31 err := c.conn.Invoke(ctx, in, out)
38 func (c *serviceClient) DeleteVhostUserIf(ctx context.Context, in *DeleteVhostUserIf) (*DeleteVhostUserIfReply, error) {
39 out := new(DeleteVhostUserIfReply)
40 err := c.conn.Invoke(ctx, in, out)
47 func (c *serviceClient) ModifyVhostUserIf(ctx context.Context, in *ModifyVhostUserIf) (*ModifyVhostUserIfReply, error) {
48 out := new(ModifyVhostUserIfReply)
49 err := c.conn.Invoke(ctx, in, out)
56 func (c *serviceClient) SwInterfaceVhostUserDump(ctx context.Context, in *SwInterfaceVhostUserDump) (RPCService_SwInterfaceVhostUserDumpClient, error) {
57 stream, err := c.conn.NewStream(ctx)
61 x := &serviceClient_SwInterfaceVhostUserDumpClient{stream}
62 if err := x.Stream.SendMsg(in); err != nil {
65 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
71 type RPCService_SwInterfaceVhostUserDumpClient interface {
72 Recv() (*SwInterfaceVhostUserDetails, error)
76 type serviceClient_SwInterfaceVhostUserDumpClient struct {
80 func (c *serviceClient_SwInterfaceVhostUserDumpClient) Recv() (*SwInterfaceVhostUserDetails, error) {
81 msg, err := c.Stream.RecvMsg()
85 switch m := msg.(type) {
86 case *SwInterfaceVhostUserDetails:
88 case *vpe.ControlPingReply:
91 return nil, fmt.Errorf("unexpected message: %T %v", m, m)