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 l3xc.
15 type RPCService interface {
16 L3xcDel(ctx context.Context, in *L3xcDel) (*L3xcDelReply, error)
17 L3xcDump(ctx context.Context, in *L3xcDump) (RPCService_L3xcDumpClient, error)
18 L3xcPluginGetVersion(ctx context.Context, in *L3xcPluginGetVersion) (*L3xcPluginGetVersionReply, error)
19 L3xcUpdate(ctx context.Context, in *L3xcUpdate) (*L3xcUpdateReply, error)
22 type serviceClient struct {
26 func NewServiceClient(conn api.Connection) RPCService {
27 return &serviceClient{conn}
30 func (c *serviceClient) L3xcDel(ctx context.Context, in *L3xcDel) (*L3xcDelReply, error) {
31 out := new(L3xcDelReply)
32 err := c.conn.Invoke(ctx, in, out)
36 return out, api.RetvalToVPPApiError(out.Retval)
39 func (c *serviceClient) L3xcDump(ctx context.Context, in *L3xcDump) (RPCService_L3xcDumpClient, error) {
40 stream, err := c.conn.NewStream(ctx)
44 x := &serviceClient_L3xcDumpClient{stream}
45 if err := x.Stream.SendMsg(in); err != nil {
48 if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
54 type RPCService_L3xcDumpClient interface {
55 Recv() (*L3xcDetails, error)
59 type serviceClient_L3xcDumpClient struct {
63 func (c *serviceClient_L3xcDumpClient) Recv() (*L3xcDetails, error) {
64 msg, err := c.Stream.RecvMsg()
68 switch m := msg.(type) {
71 case *memclnt.ControlPingReply:
72 err = c.Stream.Close()
78 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
82 func (c *serviceClient) L3xcPluginGetVersion(ctx context.Context, in *L3xcPluginGetVersion) (*L3xcPluginGetVersionReply, error) {
83 out := new(L3xcPluginGetVersionReply)
84 err := c.conn.Invoke(ctx, in, out)
91 func (c *serviceClient) L3xcUpdate(ctx context.Context, in *L3xcUpdate) (*L3xcUpdateReply, error) {
92 out := new(L3xcUpdateReply)
93 err := c.conn.Invoke(ctx, in, out)
97 return out, api.RetvalToVPPApiError(out.Retval)