1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
10 api "git.fd.io/govpp.git/api"
11 vpe "git.fd.io/govpp.git/binapi/vpe"
14 // RPCService defines RPC service vhost_user.
15 type RPCService interface {
16 CreateVhostUserIf(ctx context.Context, in *CreateVhostUserIf) (*CreateVhostUserIfReply, error)
17 CreateVhostUserIfV2(ctx context.Context, in *CreateVhostUserIfV2) (*CreateVhostUserIfV2Reply, error)
18 DeleteVhostUserIf(ctx context.Context, in *DeleteVhostUserIf) (*DeleteVhostUserIfReply, error)
19 ModifyVhostUserIf(ctx context.Context, in *ModifyVhostUserIf) (*ModifyVhostUserIfReply, error)
20 ModifyVhostUserIfV2(ctx context.Context, in *ModifyVhostUserIfV2) (*ModifyVhostUserIfV2Reply, error)
21 SwInterfaceVhostUserDump(ctx context.Context, in *SwInterfaceVhostUserDump) (RPCService_SwInterfaceVhostUserDumpClient, error)
24 type serviceClient struct {
28 func NewServiceClient(conn api.Connection) RPCService {
29 return &serviceClient{conn}
32 func (c *serviceClient) CreateVhostUserIf(ctx context.Context, in *CreateVhostUserIf) (*CreateVhostUserIfReply, error) {
33 out := new(CreateVhostUserIfReply)
34 err := c.conn.Invoke(ctx, in, out)
38 return out, api.RetvalToVPPApiError(out.Retval)
41 func (c *serviceClient) CreateVhostUserIfV2(ctx context.Context, in *CreateVhostUserIfV2) (*CreateVhostUserIfV2Reply, error) {
42 out := new(CreateVhostUserIfV2Reply)
43 err := c.conn.Invoke(ctx, in, out)
47 return out, api.RetvalToVPPApiError(out.Retval)
50 func (c *serviceClient) DeleteVhostUserIf(ctx context.Context, in *DeleteVhostUserIf) (*DeleteVhostUserIfReply, error) {
51 out := new(DeleteVhostUserIfReply)
52 err := c.conn.Invoke(ctx, in, out)
56 return out, api.RetvalToVPPApiError(out.Retval)
59 func (c *serviceClient) ModifyVhostUserIf(ctx context.Context, in *ModifyVhostUserIf) (*ModifyVhostUserIfReply, error) {
60 out := new(ModifyVhostUserIfReply)
61 err := c.conn.Invoke(ctx, in, out)
65 return out, api.RetvalToVPPApiError(out.Retval)
68 func (c *serviceClient) ModifyVhostUserIfV2(ctx context.Context, in *ModifyVhostUserIfV2) (*ModifyVhostUserIfV2Reply, error) {
69 out := new(ModifyVhostUserIfV2Reply)
70 err := c.conn.Invoke(ctx, in, out)
74 return out, api.RetvalToVPPApiError(out.Retval)
77 func (c *serviceClient) SwInterfaceVhostUserDump(ctx context.Context, in *SwInterfaceVhostUserDump) (RPCService_SwInterfaceVhostUserDumpClient, error) {
78 stream, err := c.conn.NewStream(ctx)
82 x := &serviceClient_SwInterfaceVhostUserDumpClient{stream}
83 if err := x.Stream.SendMsg(in); err != nil {
86 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
92 type RPCService_SwInterfaceVhostUserDumpClient interface {
93 Recv() (*SwInterfaceVhostUserDetails, error)
97 type serviceClient_SwInterfaceVhostUserDumpClient struct {
101 func (c *serviceClient_SwInterfaceVhostUserDumpClient) Recv() (*SwInterfaceVhostUserDetails, error) {
102 msg, err := c.Stream.RecvMsg()
106 switch m := msg.(type) {
107 case *SwInterfaceVhostUserDetails:
109 case *vpe.ControlPingReply:
110 err = c.Stream.Close()
116 return nil, fmt.Errorf("unexpected message: %T %v", m, m)