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 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:
103 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
107 func (c *serviceClient) MapIfEnableDisable(ctx context.Context, in *MapIfEnableDisable) (*MapIfEnableDisableReply, error) {
108 out := new(MapIfEnableDisableReply)
109 err := c.conn.Invoke(ctx, in, out)
113 return out, api.RetvalToVPPApiError(out.Retval)
116 func (c *serviceClient) MapParamAddDelPreResolve(ctx context.Context, in *MapParamAddDelPreResolve) (*MapParamAddDelPreResolveReply, error) {
117 out := new(MapParamAddDelPreResolveReply)
118 err := c.conn.Invoke(ctx, in, out)
122 return out, api.RetvalToVPPApiError(out.Retval)
125 func (c *serviceClient) MapParamGet(ctx context.Context, in *MapParamGet) (*MapParamGetReply, error) {
126 out := new(MapParamGetReply)
127 err := c.conn.Invoke(ctx, in, out)
131 return out, api.RetvalToVPPApiError(out.Retval)
134 func (c *serviceClient) MapParamSetFragmentation(ctx context.Context, in *MapParamSetFragmentation) (*MapParamSetFragmentationReply, error) {
135 out := new(MapParamSetFragmentationReply)
136 err := c.conn.Invoke(ctx, in, out)
140 return out, api.RetvalToVPPApiError(out.Retval)
143 func (c *serviceClient) MapParamSetICMP(ctx context.Context, in *MapParamSetICMP) (*MapParamSetICMPReply, error) {
144 out := new(MapParamSetICMPReply)
145 err := c.conn.Invoke(ctx, in, out)
149 return out, api.RetvalToVPPApiError(out.Retval)
152 func (c *serviceClient) MapParamSetICMP6(ctx context.Context, in *MapParamSetICMP6) (*MapParamSetICMP6Reply, error) {
153 out := new(MapParamSetICMP6Reply)
154 err := c.conn.Invoke(ctx, in, out)
158 return out, api.RetvalToVPPApiError(out.Retval)
161 func (c *serviceClient) MapParamSetSecurityCheck(ctx context.Context, in *MapParamSetSecurityCheck) (*MapParamSetSecurityCheckReply, error) {
162 out := new(MapParamSetSecurityCheckReply)
163 err := c.conn.Invoke(ctx, in, out)
167 return out, api.RetvalToVPPApiError(out.Retval)
170 func (c *serviceClient) MapParamSetTCP(ctx context.Context, in *MapParamSetTCP) (*MapParamSetTCPReply, error) {
171 out := new(MapParamSetTCPReply)
172 err := c.conn.Invoke(ctx, in, out)
176 return out, api.RetvalToVPPApiError(out.Retval)
179 func (c *serviceClient) MapParamSetTrafficClass(ctx context.Context, in *MapParamSetTrafficClass) (*MapParamSetTrafficClassReply, error) {
180 out := new(MapParamSetTrafficClassReply)
181 err := c.conn.Invoke(ctx, in, out)
185 return out, api.RetvalToVPPApiError(out.Retval)
188 func (c *serviceClient) MapRuleDump(ctx context.Context, in *MapRuleDump) (RPCService_MapRuleDumpClient, error) {
189 stream, err := c.conn.NewStream(ctx)
193 x := &serviceClient_MapRuleDumpClient{stream}
194 if err := x.Stream.SendMsg(in); err != nil {
197 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
203 type RPCService_MapRuleDumpClient interface {
204 Recv() (*MapRuleDetails, error)
208 type serviceClient_MapRuleDumpClient struct {
212 func (c *serviceClient_MapRuleDumpClient) Recv() (*MapRuleDetails, error) {
213 msg, err := c.Stream.RecvMsg()
217 switch m := msg.(type) {
218 case *MapRuleDetails:
220 case *vpe.ControlPingReply:
223 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
227 func (c *serviceClient) MapSummaryStats(ctx context.Context, in *MapSummaryStats) (*MapSummaryStatsReply, error) {
228 out := new(MapSummaryStatsReply)
229 err := c.conn.Invoke(ctx, in, out)
233 return out, api.RetvalToVPPApiError(out.Retval)