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 lisp_gpe.
15 type RPCService interface {
16 GpeAddDelFwdEntry(ctx context.Context, in *GpeAddDelFwdEntry) (*GpeAddDelFwdEntryReply, error)
17 GpeAddDelIface(ctx context.Context, in *GpeAddDelIface) (*GpeAddDelIfaceReply, error)
18 GpeAddDelNativeFwdRpath(ctx context.Context, in *GpeAddDelNativeFwdRpath) (*GpeAddDelNativeFwdRpathReply, error)
19 GpeEnableDisable(ctx context.Context, in *GpeEnableDisable) (*GpeEnableDisableReply, error)
20 GpeFwdEntriesGet(ctx context.Context, in *GpeFwdEntriesGet) (*GpeFwdEntriesGetReply, error)
21 GpeFwdEntryPathDump(ctx context.Context, in *GpeFwdEntryPathDump) (RPCService_GpeFwdEntryPathDumpClient, error)
22 GpeFwdEntryVnisGet(ctx context.Context, in *GpeFwdEntryVnisGet) (*GpeFwdEntryVnisGetReply, error)
23 GpeGetEncapMode(ctx context.Context, in *GpeGetEncapMode) (*GpeGetEncapModeReply, error)
24 GpeNativeFwdRpathsGet(ctx context.Context, in *GpeNativeFwdRpathsGet) (*GpeNativeFwdRpathsGetReply, error)
25 GpeSetEncapMode(ctx context.Context, in *GpeSetEncapMode) (*GpeSetEncapModeReply, error)
28 type serviceClient struct {
32 func NewServiceClient(conn api.Connection) RPCService {
33 return &serviceClient{conn}
36 func (c *serviceClient) GpeAddDelFwdEntry(ctx context.Context, in *GpeAddDelFwdEntry) (*GpeAddDelFwdEntryReply, error) {
37 out := new(GpeAddDelFwdEntryReply)
38 err := c.conn.Invoke(ctx, in, out)
42 return out, api.RetvalToVPPApiError(out.Retval)
45 func (c *serviceClient) GpeAddDelIface(ctx context.Context, in *GpeAddDelIface) (*GpeAddDelIfaceReply, error) {
46 out := new(GpeAddDelIfaceReply)
47 err := c.conn.Invoke(ctx, in, out)
51 return out, api.RetvalToVPPApiError(out.Retval)
54 func (c *serviceClient) GpeAddDelNativeFwdRpath(ctx context.Context, in *GpeAddDelNativeFwdRpath) (*GpeAddDelNativeFwdRpathReply, error) {
55 out := new(GpeAddDelNativeFwdRpathReply)
56 err := c.conn.Invoke(ctx, in, out)
60 return out, api.RetvalToVPPApiError(out.Retval)
63 func (c *serviceClient) GpeEnableDisable(ctx context.Context, in *GpeEnableDisable) (*GpeEnableDisableReply, error) {
64 out := new(GpeEnableDisableReply)
65 err := c.conn.Invoke(ctx, in, out)
69 return out, api.RetvalToVPPApiError(out.Retval)
72 func (c *serviceClient) GpeFwdEntriesGet(ctx context.Context, in *GpeFwdEntriesGet) (*GpeFwdEntriesGetReply, error) {
73 out := new(GpeFwdEntriesGetReply)
74 err := c.conn.Invoke(ctx, in, out)
78 return out, api.RetvalToVPPApiError(out.Retval)
81 func (c *serviceClient) GpeFwdEntryPathDump(ctx context.Context, in *GpeFwdEntryPathDump) (RPCService_GpeFwdEntryPathDumpClient, error) {
82 stream, err := c.conn.NewStream(ctx)
86 x := &serviceClient_GpeFwdEntryPathDumpClient{stream}
87 if err := x.Stream.SendMsg(in); err != nil {
90 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
96 type RPCService_GpeFwdEntryPathDumpClient interface {
97 Recv() (*GpeFwdEntryPathDetails, error)
101 type serviceClient_GpeFwdEntryPathDumpClient struct {
105 func (c *serviceClient_GpeFwdEntryPathDumpClient) Recv() (*GpeFwdEntryPathDetails, error) {
106 msg, err := c.Stream.RecvMsg()
110 switch m := msg.(type) {
111 case *GpeFwdEntryPathDetails:
113 case *vpe.ControlPingReply:
114 err = c.Stream.Close()
120 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
124 func (c *serviceClient) GpeFwdEntryVnisGet(ctx context.Context, in *GpeFwdEntryVnisGet) (*GpeFwdEntryVnisGetReply, error) {
125 out := new(GpeFwdEntryVnisGetReply)
126 err := c.conn.Invoke(ctx, in, out)
130 return out, api.RetvalToVPPApiError(out.Retval)
133 func (c *serviceClient) GpeGetEncapMode(ctx context.Context, in *GpeGetEncapMode) (*GpeGetEncapModeReply, error) {
134 out := new(GpeGetEncapModeReply)
135 err := c.conn.Invoke(ctx, in, out)
139 return out, api.RetvalToVPPApiError(out.Retval)
142 func (c *serviceClient) GpeNativeFwdRpathsGet(ctx context.Context, in *GpeNativeFwdRpathsGet) (*GpeNativeFwdRpathsGetReply, error) {
143 out := new(GpeNativeFwdRpathsGetReply)
144 err := c.conn.Invoke(ctx, in, out)
148 return out, api.RetvalToVPPApiError(out.Retval)
151 func (c *serviceClient) GpeSetEncapMode(ctx context.Context, in *GpeSetEncapMode) (*GpeSetEncapModeReply, error) {
152 out := new(GpeSetEncapModeReply)
153 err := c.conn.Invoke(ctx, in, out)
157 return out, api.RetvalToVPPApiError(out.Retval)