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/internal/testbinapi/binapi2001/vpe"
14 // RPCService defines RPC service map.
15 type RPCService interface {
16 MapAddDelRule(ctx context.Context, in *MapAddDelRule) (*MapAddDelRuleReply, error)
17 MapAddDomain(ctx context.Context, in *MapAddDomain) (*MapAddDomainReply, error)
18 MapDelDomain(ctx context.Context, in *MapDelDomain) (*MapDelDomainReply, error)
19 MapDomainDump(ctx context.Context, in *MapDomainDump) (RPCService_MapDomainDumpClient, error)
20 MapIfEnableDisable(ctx context.Context, in *MapIfEnableDisable) (*MapIfEnableDisableReply, error)
21 MapParamAddDelPreResolve(ctx context.Context, in *MapParamAddDelPreResolve) (*MapParamAddDelPreResolveReply, error)
22 MapParamGet(ctx context.Context, in *MapParamGet) (*MapParamGetReply, error)
23 MapParamSetFragmentation(ctx context.Context, in *MapParamSetFragmentation) (*MapParamSetFragmentationReply, error)
24 MapParamSetICMP(ctx context.Context, in *MapParamSetICMP) (*MapParamSetICMPReply, error)
25 MapParamSetICMP6(ctx context.Context, in *MapParamSetICMP6) (*MapParamSetICMP6Reply, error)
26 MapParamSetSecurityCheck(ctx context.Context, in *MapParamSetSecurityCheck) (*MapParamSetSecurityCheckReply, error)
27 MapParamSetTCP(ctx context.Context, in *MapParamSetTCP) (*MapParamSetTCPReply, error)
28 MapParamSetTrafficClass(ctx context.Context, in *MapParamSetTrafficClass) (*MapParamSetTrafficClassReply, error)
29 MapRuleDump(ctx context.Context, in *MapRuleDump) (RPCService_MapRuleDumpClient, error)
30 MapSummaryStats(ctx context.Context, in *MapSummaryStats) (*MapSummaryStatsReply, error)
33 type serviceClient struct {
37 func NewServiceClient(conn api.Connection) RPCService {
38 return &serviceClient{conn}
41 func (c *serviceClient) MapAddDelRule(ctx context.Context, in *MapAddDelRule) (*MapAddDelRuleReply, error) {
42 out := new(MapAddDelRuleReply)
43 err := c.conn.Invoke(ctx, in, out)
47 return out, api.RetvalToVPPApiError(out.Retval)
50 func (c *serviceClient) MapAddDomain(ctx context.Context, in *MapAddDomain) (*MapAddDomainReply, error) {
51 out := new(MapAddDomainReply)
52 err := c.conn.Invoke(ctx, in, out)
56 return out, api.RetvalToVPPApiError(out.Retval)
59 func (c *serviceClient) MapDelDomain(ctx context.Context, in *MapDelDomain) (*MapDelDomainReply, error) {
60 out := new(MapDelDomainReply)
61 err := c.conn.Invoke(ctx, in, out)
65 return out, api.RetvalToVPPApiError(out.Retval)
68 func (c *serviceClient) MapDomainDump(ctx context.Context, in *MapDomainDump) (RPCService_MapDomainDumpClient, error) {
69 stream, err := c.conn.NewStream(ctx)
73 x := &serviceClient_MapDomainDumpClient{stream}
74 if err := x.Stream.SendMsg(in); err != nil {
77 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
83 type RPCService_MapDomainDumpClient interface {
84 Recv() (*MapDomainDetails, error)
88 type serviceClient_MapDomainDumpClient struct {
92 func (c *serviceClient_MapDomainDumpClient) Recv() (*MapDomainDetails, error) {
93 msg, err := c.Stream.RecvMsg()
97 switch m := msg.(type) {
98 case *MapDomainDetails:
100 case *vpe.ControlPingReply:
101 err = c.Stream.Close()
107 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
111 func (c *serviceClient) MapIfEnableDisable(ctx context.Context, in *MapIfEnableDisable) (*MapIfEnableDisableReply, error) {
112 out := new(MapIfEnableDisableReply)
113 err := c.conn.Invoke(ctx, in, out)
117 return out, api.RetvalToVPPApiError(out.Retval)
120 func (c *serviceClient) MapParamAddDelPreResolve(ctx context.Context, in *MapParamAddDelPreResolve) (*MapParamAddDelPreResolveReply, error) {
121 out := new(MapParamAddDelPreResolveReply)
122 err := c.conn.Invoke(ctx, in, out)
126 return out, api.RetvalToVPPApiError(out.Retval)
129 func (c *serviceClient) MapParamGet(ctx context.Context, in *MapParamGet) (*MapParamGetReply, error) {
130 out := new(MapParamGetReply)
131 err := c.conn.Invoke(ctx, in, out)
135 return out, api.RetvalToVPPApiError(out.Retval)
138 func (c *serviceClient) MapParamSetFragmentation(ctx context.Context, in *MapParamSetFragmentation) (*MapParamSetFragmentationReply, error) {
139 out := new(MapParamSetFragmentationReply)
140 err := c.conn.Invoke(ctx, in, out)
144 return out, api.RetvalToVPPApiError(out.Retval)
147 func (c *serviceClient) MapParamSetICMP(ctx context.Context, in *MapParamSetICMP) (*MapParamSetICMPReply, error) {
148 out := new(MapParamSetICMPReply)
149 err := c.conn.Invoke(ctx, in, out)
153 return out, api.RetvalToVPPApiError(out.Retval)
156 func (c *serviceClient) MapParamSetICMP6(ctx context.Context, in *MapParamSetICMP6) (*MapParamSetICMP6Reply, error) {
157 out := new(MapParamSetICMP6Reply)
158 err := c.conn.Invoke(ctx, in, out)
162 return out, api.RetvalToVPPApiError(out.Retval)
165 func (c *serviceClient) MapParamSetSecurityCheck(ctx context.Context, in *MapParamSetSecurityCheck) (*MapParamSetSecurityCheckReply, error) {
166 out := new(MapParamSetSecurityCheckReply)
167 err := c.conn.Invoke(ctx, in, out)
171 return out, api.RetvalToVPPApiError(out.Retval)
174 func (c *serviceClient) MapParamSetTCP(ctx context.Context, in *MapParamSetTCP) (*MapParamSetTCPReply, error) {
175 out := new(MapParamSetTCPReply)
176 err := c.conn.Invoke(ctx, in, out)
180 return out, api.RetvalToVPPApiError(out.Retval)
183 func (c *serviceClient) MapParamSetTrafficClass(ctx context.Context, in *MapParamSetTrafficClass) (*MapParamSetTrafficClassReply, error) {
184 out := new(MapParamSetTrafficClassReply)
185 err := c.conn.Invoke(ctx, in, out)
189 return out, api.RetvalToVPPApiError(out.Retval)
192 func (c *serviceClient) MapRuleDump(ctx context.Context, in *MapRuleDump) (RPCService_MapRuleDumpClient, error) {
193 stream, err := c.conn.NewStream(ctx)
197 x := &serviceClient_MapRuleDumpClient{stream}
198 if err := x.Stream.SendMsg(in); err != nil {
201 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
207 type RPCService_MapRuleDumpClient interface {
208 Recv() (*MapRuleDetails, error)
212 type serviceClient_MapRuleDumpClient struct {
216 func (c *serviceClient_MapRuleDumpClient) Recv() (*MapRuleDetails, error) {
217 msg, err := c.Stream.RecvMsg()
221 switch m := msg.(type) {
222 case *MapRuleDetails:
224 case *vpe.ControlPingReply:
225 err = c.Stream.Close()
231 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
235 func (c *serviceClient) MapSummaryStats(ctx context.Context, in *MapSummaryStats) (*MapSummaryStatsReply, error) {
236 out := new(MapSummaryStatsReply)
237 err := c.conn.Invoke(ctx, in, out)
241 return out, api.RetvalToVPPApiError(out.Retval)