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 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 MapDomainsGet(ctx context.Context, in *MapDomainsGet) (RPCService_MapDomainsGetClient, error)
21 MapIfEnableDisable(ctx context.Context, in *MapIfEnableDisable) (*MapIfEnableDisableReply, error)
22 MapParamAddDelPreResolve(ctx context.Context, in *MapParamAddDelPreResolve) (*MapParamAddDelPreResolveReply, error)
23 MapParamGet(ctx context.Context, in *MapParamGet) (*MapParamGetReply, error)
24 MapParamSetFragmentation(ctx context.Context, in *MapParamSetFragmentation) (*MapParamSetFragmentationReply, error)
25 MapParamSetICMP(ctx context.Context, in *MapParamSetICMP) (*MapParamSetICMPReply, error)
26 MapParamSetICMP6(ctx context.Context, in *MapParamSetICMP6) (*MapParamSetICMP6Reply, error)
27 MapParamSetSecurityCheck(ctx context.Context, in *MapParamSetSecurityCheck) (*MapParamSetSecurityCheckReply, error)
28 MapParamSetTCP(ctx context.Context, in *MapParamSetTCP) (*MapParamSetTCPReply, error)
29 MapParamSetTrafficClass(ctx context.Context, in *MapParamSetTrafficClass) (*MapParamSetTrafficClassReply, error)
30 MapRuleDump(ctx context.Context, in *MapRuleDump) (RPCService_MapRuleDumpClient, error)
31 MapSummaryStats(ctx context.Context, in *MapSummaryStats) (*MapSummaryStatsReply, error)
34 type serviceClient struct {
38 func NewServiceClient(conn api.Connection) RPCService {
39 return &serviceClient{conn}
42 func (c *serviceClient) MapAddDelRule(ctx context.Context, in *MapAddDelRule) (*MapAddDelRuleReply, error) {
43 out := new(MapAddDelRuleReply)
44 err := c.conn.Invoke(ctx, in, out)
48 return out, api.RetvalToVPPApiError(out.Retval)
51 func (c *serviceClient) MapAddDomain(ctx context.Context, in *MapAddDomain) (*MapAddDomainReply, error) {
52 out := new(MapAddDomainReply)
53 err := c.conn.Invoke(ctx, in, out)
57 return out, api.RetvalToVPPApiError(out.Retval)
60 func (c *serviceClient) MapDelDomain(ctx context.Context, in *MapDelDomain) (*MapDelDomainReply, error) {
61 out := new(MapDelDomainReply)
62 err := c.conn.Invoke(ctx, in, out)
66 return out, api.RetvalToVPPApiError(out.Retval)
69 func (c *serviceClient) MapDomainDump(ctx context.Context, in *MapDomainDump) (RPCService_MapDomainDumpClient, error) {
70 stream, err := c.conn.NewStream(ctx)
74 x := &serviceClient_MapDomainDumpClient{stream}
75 if err := x.Stream.SendMsg(in); err != nil {
78 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
84 type RPCService_MapDomainDumpClient interface {
85 Recv() (*MapDomainDetails, error)
89 type serviceClient_MapDomainDumpClient struct {
93 func (c *serviceClient_MapDomainDumpClient) Recv() (*MapDomainDetails, error) {
94 msg, err := c.Stream.RecvMsg()
98 switch m := msg.(type) {
99 case *MapDomainDetails:
101 case *vpe.ControlPingReply:
104 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
108 func (c *serviceClient) MapDomainsGet(ctx context.Context, in *MapDomainsGet) (RPCService_MapDomainsGetClient, error) {
109 stream, err := c.conn.NewStream(ctx)
113 x := &serviceClient_MapDomainsGetClient{stream}
114 if err := x.Stream.SendMsg(in); err != nil {
120 type RPCService_MapDomainsGetClient interface {
121 Recv() (*MapDomainDetails, error)
125 type serviceClient_MapDomainsGetClient struct {
129 func (c *serviceClient_MapDomainsGetClient) Recv() (*MapDomainDetails, error) {
130 msg, err := c.Stream.RecvMsg()
134 switch m := msg.(type) {
135 case *MapDomainDetails:
137 case *MapDomainsGetReply:
140 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
144 func (c *serviceClient) MapIfEnableDisable(ctx context.Context, in *MapIfEnableDisable) (*MapIfEnableDisableReply, error) {
145 out := new(MapIfEnableDisableReply)
146 err := c.conn.Invoke(ctx, in, out)
150 return out, api.RetvalToVPPApiError(out.Retval)
153 func (c *serviceClient) MapParamAddDelPreResolve(ctx context.Context, in *MapParamAddDelPreResolve) (*MapParamAddDelPreResolveReply, error) {
154 out := new(MapParamAddDelPreResolveReply)
155 err := c.conn.Invoke(ctx, in, out)
159 return out, api.RetvalToVPPApiError(out.Retval)
162 func (c *serviceClient) MapParamGet(ctx context.Context, in *MapParamGet) (*MapParamGetReply, error) {
163 out := new(MapParamGetReply)
164 err := c.conn.Invoke(ctx, in, out)
168 return out, api.RetvalToVPPApiError(out.Retval)
171 func (c *serviceClient) MapParamSetFragmentation(ctx context.Context, in *MapParamSetFragmentation) (*MapParamSetFragmentationReply, error) {
172 out := new(MapParamSetFragmentationReply)
173 err := c.conn.Invoke(ctx, in, out)
177 return out, api.RetvalToVPPApiError(out.Retval)
180 func (c *serviceClient) MapParamSetICMP(ctx context.Context, in *MapParamSetICMP) (*MapParamSetICMPReply, error) {
181 out := new(MapParamSetICMPReply)
182 err := c.conn.Invoke(ctx, in, out)
186 return out, api.RetvalToVPPApiError(out.Retval)
189 func (c *serviceClient) MapParamSetICMP6(ctx context.Context, in *MapParamSetICMP6) (*MapParamSetICMP6Reply, error) {
190 out := new(MapParamSetICMP6Reply)
191 err := c.conn.Invoke(ctx, in, out)
195 return out, api.RetvalToVPPApiError(out.Retval)
198 func (c *serviceClient) MapParamSetSecurityCheck(ctx context.Context, in *MapParamSetSecurityCheck) (*MapParamSetSecurityCheckReply, error) {
199 out := new(MapParamSetSecurityCheckReply)
200 err := c.conn.Invoke(ctx, in, out)
204 return out, api.RetvalToVPPApiError(out.Retval)
207 func (c *serviceClient) MapParamSetTCP(ctx context.Context, in *MapParamSetTCP) (*MapParamSetTCPReply, error) {
208 out := new(MapParamSetTCPReply)
209 err := c.conn.Invoke(ctx, in, out)
213 return out, api.RetvalToVPPApiError(out.Retval)
216 func (c *serviceClient) MapParamSetTrafficClass(ctx context.Context, in *MapParamSetTrafficClass) (*MapParamSetTrafficClassReply, error) {
217 out := new(MapParamSetTrafficClassReply)
218 err := c.conn.Invoke(ctx, in, out)
222 return out, api.RetvalToVPPApiError(out.Retval)
225 func (c *serviceClient) MapRuleDump(ctx context.Context, in *MapRuleDump) (RPCService_MapRuleDumpClient, error) {
226 stream, err := c.conn.NewStream(ctx)
230 x := &serviceClient_MapRuleDumpClient{stream}
231 if err := x.Stream.SendMsg(in); err != nil {
234 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
240 type RPCService_MapRuleDumpClient interface {
241 Recv() (*MapRuleDetails, error)
245 type serviceClient_MapRuleDumpClient struct {
249 func (c *serviceClient_MapRuleDumpClient) Recv() (*MapRuleDetails, error) {
250 msg, err := c.Stream.RecvMsg()
254 switch m := msg.(type) {
255 case *MapRuleDetails:
257 case *vpe.ControlPingReply:
260 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
264 func (c *serviceClient) MapSummaryStats(ctx context.Context, in *MapSummaryStats) (*MapSummaryStatsReply, error) {
265 out := new(MapSummaryStatsReply)
266 err := c.conn.Invoke(ctx, in, out)
270 return out, api.RetvalToVPPApiError(out.Retval)