aboutsummaryrefslogtreecommitdiffstats
path: root/internal/testbinapi/binapi2001/memif/memif_rpc.ba.go
blob: 8eda8f1aacec1018c806e64c34b07906a421c953 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.

package memif

import (
	"context"
	"io"

	api "git.fd.io/govpp.git/api"
)

// RPCService represents RPC service API for memif module.
type RPCService interface {
	DumpMemif(ctx context.Context, in *MemifDump) (RPCService_DumpMemifClient, error)
	DumpMemifSocketFilename(ctx context.Context, in *MemifSocketFilenameDump) (RPCService_DumpMemifSocketFilenameClient, error)
	MemifCreate(ctx context.Context, in *MemifCreate) (*MemifCreateReply, error)
	MemifDelete(ctx context.Context, in *MemifDelete) (*MemifDeleteReply, error)
	MemifSocketFilenameAddDel(ctx context.Context, in *MemifSocketFilenameAddDel) (*MemifSocketFilenameAddDelReply, error)
}

type serviceClient struct {
	ch api.Channel
}

func NewServiceClient(ch api.Channel) RPCService {
	return &serviceClient{ch}
}

func (c *serviceClient) DumpMemif(ctx context.Context, in *MemifDump) (RPCService_DumpMemifClient, error) {
	stream := c.ch.SendMultiRequest(in)
	x := &serviceClient_DumpMemifClient{stream}
	return x, nil
}

type RPCService_DumpMemifClient interface {
	Recv() (*MemifDetails, error)
}

type serviceClient_DumpMemifClient struct {
	api.MultiRequestCtx
}

func (c *serviceClient_DumpMemifClient) Recv() (*MemifDetails, error) {
	m := new(MemifDetails)
	stop, err := c.MultiRequestCtx.ReceiveReply(m)
	if err != nil {
		return nil, err
	}
	if stop {
		return nil, io.EOF
	}
	return m, nil
}

func (c *serviceClient) DumpMemifSocketFilename(ctx context.Context, in *MemifSocketFilenameDump) (RPCService_DumpMemifSocketFilenameClient, error) {
	stream := c.ch.SendMultiRequest(in)
	x := &serviceClient_DumpMemifSocketFilenameClient{stream}
	return x, nil
}

type RPCService_DumpMemifSocketFilenameClient interface {
	Recv() (*MemifSocketFilenameDetails, error)
}

type serviceClient_DumpMemifSocketFilenameClient struct {
	api.MultiRequestCtx
}

func (c *serviceClient_DumpMemifSocketFilenameClient) Recv() (*MemifSocketFilenameDetails, error) {
	m := new(MemifSocketFilenameDetails)
	stop, err := c.MultiRequestCtx.ReceiveReply(m)
	if err != nil {
		return nil, err
	}
	if stop {
		return nil, io.EOF
	}
	return m, nil
}

func (c *serviceClient) MemifCreate(ctx context.Context, in *MemifCreate) (*MemifCreateReply, error) {
	out := new(MemifCreateReply)
	err := c.ch.SendRequest(in).ReceiveReply(out)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *serviceClient) MemifDelete(ctx context.Context, in *MemifDelete) (*MemifDeleteReply, error) {
	out := new(MemifDeleteReply)
	err := c.ch.SendRequest(in).ReceiveReply(out)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *serviceClient) MemifSocketFilenameAddDel(ctx context.Context, in *MemifSocketFilenameAddDel) (*MemifSocketFilenameAddDelReply, error) {
	out := new(MemifSocketFilenameAddDelReply)
	err := c.ch.SendRequest(in).ReceiveReply(out)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// Reference imports to suppress errors if they are not otherwise used.
var _ = api.RegisterMessage
var _ = context.Background
var _ = io.Copy