1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
10 api "git.fd.io/govpp.git/api"
13 // RPCService defines RPC service vpe.
14 type RPCService interface {
15 AddNodeNext(ctx context.Context, in *AddNodeNext) (*AddNodeNextReply, error)
16 Cli(ctx context.Context, in *Cli) (*CliReply, error)
17 CliInband(ctx context.Context, in *CliInband) (*CliInbandReply, error)
18 ControlPing(ctx context.Context, in *ControlPing) (*ControlPingReply, error)
19 GetF64EndianValue(ctx context.Context, in *GetF64EndianValue) (*GetF64EndianValueReply, error)
20 GetF64IncrementByOne(ctx context.Context, in *GetF64IncrementByOne) (*GetF64IncrementByOneReply, error)
21 GetNextIndex(ctx context.Context, in *GetNextIndex) (*GetNextIndexReply, error)
22 GetNodeGraph(ctx context.Context, in *GetNodeGraph) (*GetNodeGraphReply, error)
23 GetNodeIndex(ctx context.Context, in *GetNodeIndex) (*GetNodeIndexReply, error)
24 LogDump(ctx context.Context, in *LogDump) (RPCService_LogDumpClient, error)
25 ShowThreads(ctx context.Context, in *ShowThreads) (*ShowThreadsReply, error)
26 ShowVersion(ctx context.Context, in *ShowVersion) (*ShowVersionReply, error)
27 ShowVpeSystemTime(ctx context.Context, in *ShowVpeSystemTime) (*ShowVpeSystemTimeReply, error)
30 type serviceClient struct {
34 func NewServiceClient(conn api.Connection) RPCService {
35 return &serviceClient{conn}
38 func (c *serviceClient) AddNodeNext(ctx context.Context, in *AddNodeNext) (*AddNodeNextReply, error) {
39 out := new(AddNodeNextReply)
40 err := c.conn.Invoke(ctx, in, out)
44 return out, api.RetvalToVPPApiError(out.Retval)
47 func (c *serviceClient) Cli(ctx context.Context, in *Cli) (*CliReply, error) {
49 err := c.conn.Invoke(ctx, in, out)
53 return out, api.RetvalToVPPApiError(out.Retval)
56 func (c *serviceClient) CliInband(ctx context.Context, in *CliInband) (*CliInbandReply, error) {
57 out := new(CliInbandReply)
58 err := c.conn.Invoke(ctx, in, out)
62 return out, api.RetvalToVPPApiError(out.Retval)
65 func (c *serviceClient) ControlPing(ctx context.Context, in *ControlPing) (*ControlPingReply, error) {
66 out := new(ControlPingReply)
67 err := c.conn.Invoke(ctx, in, out)
71 return out, api.RetvalToVPPApiError(out.Retval)
74 func (c *serviceClient) GetF64EndianValue(ctx context.Context, in *GetF64EndianValue) (*GetF64EndianValueReply, error) {
75 out := new(GetF64EndianValueReply)
76 err := c.conn.Invoke(ctx, in, out)
80 return out, api.RetvalToVPPApiError(int32(out.Retval))
83 func (c *serviceClient) GetF64IncrementByOne(ctx context.Context, in *GetF64IncrementByOne) (*GetF64IncrementByOneReply, error) {
84 out := new(GetF64IncrementByOneReply)
85 err := c.conn.Invoke(ctx, in, out)
89 return out, api.RetvalToVPPApiError(int32(out.Retval))
92 func (c *serviceClient) GetNextIndex(ctx context.Context, in *GetNextIndex) (*GetNextIndexReply, error) {
93 out := new(GetNextIndexReply)
94 err := c.conn.Invoke(ctx, in, out)
98 return out, api.RetvalToVPPApiError(out.Retval)
101 func (c *serviceClient) GetNodeGraph(ctx context.Context, in *GetNodeGraph) (*GetNodeGraphReply, error) {
102 out := new(GetNodeGraphReply)
103 err := c.conn.Invoke(ctx, in, out)
107 return out, api.RetvalToVPPApiError(out.Retval)
110 func (c *serviceClient) GetNodeIndex(ctx context.Context, in *GetNodeIndex) (*GetNodeIndexReply, error) {
111 out := new(GetNodeIndexReply)
112 err := c.conn.Invoke(ctx, in, out)
116 return out, api.RetvalToVPPApiError(out.Retval)
119 func (c *serviceClient) LogDump(ctx context.Context, in *LogDump) (RPCService_LogDumpClient, error) {
120 stream, err := c.conn.NewStream(ctx)
124 x := &serviceClient_LogDumpClient{stream}
125 if err := x.Stream.SendMsg(in); err != nil {
128 if err = x.Stream.SendMsg(&ControlPing{}); err != nil {
134 type RPCService_LogDumpClient interface {
135 Recv() (*LogDetails, error)
139 type serviceClient_LogDumpClient struct {
143 func (c *serviceClient_LogDumpClient) Recv() (*LogDetails, error) {
144 msg, err := c.Stream.RecvMsg()
148 switch m := msg.(type) {
151 case *ControlPingReply:
154 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
158 func (c *serviceClient) ShowThreads(ctx context.Context, in *ShowThreads) (*ShowThreadsReply, error) {
159 out := new(ShowThreadsReply)
160 err := c.conn.Invoke(ctx, in, out)
164 return out, api.RetvalToVPPApiError(out.Retval)
167 func (c *serviceClient) ShowVersion(ctx context.Context, in *ShowVersion) (*ShowVersionReply, error) {
168 out := new(ShowVersionReply)
169 err := c.conn.Invoke(ctx, in, out)
173 return out, api.RetvalToVPPApiError(out.Retval)
176 func (c *serviceClient) ShowVpeSystemTime(ctx context.Context, in *ShowVpeSystemTime) (*ShowVpeSystemTimeReply, error) {
177 out := new(ShowVpeSystemTimeReply)
178 err := c.conn.Invoke(ctx, in, out)
182 return out, api.RetvalToVPPApiError(out.Retval)