1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
10 api "go.fd.io/govpp/api"
11 memclnt "go.fd.io/govpp/binapi/memclnt"
14 // RPCService defines RPC service vpe.
15 type RPCService interface {
16 LogDump(ctx context.Context, in *LogDump) (RPCService_LogDumpClient, error)
17 ShowVersion(ctx context.Context, in *ShowVersion) (*ShowVersionReply, error)
18 ShowVpeSystemTime(ctx context.Context, in *ShowVpeSystemTime) (*ShowVpeSystemTimeReply, error)
21 type serviceClient struct {
25 func NewServiceClient(conn api.Connection) RPCService {
26 return &serviceClient{conn}
29 func (c *serviceClient) LogDump(ctx context.Context, in *LogDump) (RPCService_LogDumpClient, error) {
30 stream, err := c.conn.NewStream(ctx)
34 x := &serviceClient_LogDumpClient{stream}
35 if err := x.Stream.SendMsg(in); err != nil {
38 if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
44 type RPCService_LogDumpClient interface {
45 Recv() (*LogDetails, error)
49 type serviceClient_LogDumpClient struct {
53 func (c *serviceClient_LogDumpClient) Recv() (*LogDetails, error) {
54 msg, err := c.Stream.RecvMsg()
58 switch m := msg.(type) {
61 case *memclnt.ControlPingReply:
62 err = c.Stream.Close()
68 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
72 func (c *serviceClient) ShowVersion(ctx context.Context, in *ShowVersion) (*ShowVersionReply, error) {
73 out := new(ShowVersionReply)
74 err := c.conn.Invoke(ctx, in, out)
78 return out, api.RetvalToVPPApiError(out.Retval)
81 func (c *serviceClient) ShowVpeSystemTime(ctx context.Context, in *ShowVpeSystemTime) (*ShowVpeSystemTimeReply, error) {
82 out := new(ShowVpeSystemTimeReply)
83 err := c.conn.Invoke(ctx, in, out)
87 return out, api.RetvalToVPPApiError(out.Retval)