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 session.
15 type RPCService interface {
16 AppAddCertKeyPair(ctx context.Context, in *AppAddCertKeyPair) (*AppAddCertKeyPairReply, error)
17 AppAttach(ctx context.Context, in *AppAttach) (*AppAttachReply, error)
18 AppCutThroughRegistrationAdd(ctx context.Context, in *AppCutThroughRegistrationAdd) (*AppCutThroughRegistrationAddReply, error)
19 AppDelCertKeyPair(ctx context.Context, in *AppDelCertKeyPair) (*AppDelCertKeyPairReply, error)
20 AppNamespaceAddDel(ctx context.Context, in *AppNamespaceAddDel) (*AppNamespaceAddDelReply, error)
21 AppWorkerAddDel(ctx context.Context, in *AppWorkerAddDel) (*AppWorkerAddDelReply, error)
22 ApplicationAttach(ctx context.Context, in *ApplicationAttach) (*ApplicationAttachReply, error)
23 ApplicationDetach(ctx context.Context, in *ApplicationDetach) (*ApplicationDetachReply, error)
24 ApplicationTLSCertAdd(ctx context.Context, in *ApplicationTLSCertAdd) (*ApplicationTLSCertAddReply, error)
25 ApplicationTLSKeyAdd(ctx context.Context, in *ApplicationTLSKeyAdd) (*ApplicationTLSKeyAddReply, error)
26 BindSock(ctx context.Context, in *BindSock) (*BindSockReply, error)
27 BindURI(ctx context.Context, in *BindURI) (*BindURIReply, error)
28 ConnectSock(ctx context.Context, in *ConnectSock) (*ConnectSockReply, error)
29 ConnectURI(ctx context.Context, in *ConnectURI) (*ConnectURIReply, error)
30 DisconnectSession(ctx context.Context, in *DisconnectSession) (*DisconnectSessionReply, error)
31 MapAnotherSegment(ctx context.Context, in *MapAnotherSegment) (*MapAnotherSegmentReply, error)
32 SessionEnableDisable(ctx context.Context, in *SessionEnableDisable) (*SessionEnableDisableReply, error)
33 SessionRuleAddDel(ctx context.Context, in *SessionRuleAddDel) (*SessionRuleAddDelReply, error)
34 SessionRulesDump(ctx context.Context, in *SessionRulesDump) (RPCService_SessionRulesDumpClient, error)
35 UnbindSock(ctx context.Context, in *UnbindSock) (*UnbindSockReply, error)
36 UnbindURI(ctx context.Context, in *UnbindURI) (*UnbindURIReply, error)
37 UnmapSegment(ctx context.Context, in *UnmapSegment) (*UnmapSegmentReply, error)
40 type serviceClient struct {
44 func NewServiceClient(conn api.Connection) RPCService {
45 return &serviceClient{conn}
48 func (c *serviceClient) AppAddCertKeyPair(ctx context.Context, in *AppAddCertKeyPair) (*AppAddCertKeyPairReply, error) {
49 out := new(AppAddCertKeyPairReply)
50 err := c.conn.Invoke(ctx, in, out)
54 return out, api.RetvalToVPPApiError(out.Retval)
57 func (c *serviceClient) AppAttach(ctx context.Context, in *AppAttach) (*AppAttachReply, error) {
58 out := new(AppAttachReply)
59 err := c.conn.Invoke(ctx, in, out)
63 return out, api.RetvalToVPPApiError(out.Retval)
66 func (c *serviceClient) AppCutThroughRegistrationAdd(ctx context.Context, in *AppCutThroughRegistrationAdd) (*AppCutThroughRegistrationAddReply, error) {
67 out := new(AppCutThroughRegistrationAddReply)
68 err := c.conn.Invoke(ctx, in, out)
72 return out, api.RetvalToVPPApiError(out.Retval)
75 func (c *serviceClient) AppDelCertKeyPair(ctx context.Context, in *AppDelCertKeyPair) (*AppDelCertKeyPairReply, error) {
76 out := new(AppDelCertKeyPairReply)
77 err := c.conn.Invoke(ctx, in, out)
81 return out, api.RetvalToVPPApiError(out.Retval)
84 func (c *serviceClient) AppNamespaceAddDel(ctx context.Context, in *AppNamespaceAddDel) (*AppNamespaceAddDelReply, error) {
85 out := new(AppNamespaceAddDelReply)
86 err := c.conn.Invoke(ctx, in, out)
90 return out, api.RetvalToVPPApiError(out.Retval)
93 func (c *serviceClient) AppWorkerAddDel(ctx context.Context, in *AppWorkerAddDel) (*AppWorkerAddDelReply, error) {
94 out := new(AppWorkerAddDelReply)
95 err := c.conn.Invoke(ctx, in, out)
99 return out, api.RetvalToVPPApiError(out.Retval)
102 func (c *serviceClient) ApplicationAttach(ctx context.Context, in *ApplicationAttach) (*ApplicationAttachReply, error) {
103 out := new(ApplicationAttachReply)
104 err := c.conn.Invoke(ctx, in, out)
108 return out, api.RetvalToVPPApiError(out.Retval)
111 func (c *serviceClient) ApplicationDetach(ctx context.Context, in *ApplicationDetach) (*ApplicationDetachReply, error) {
112 out := new(ApplicationDetachReply)
113 err := c.conn.Invoke(ctx, in, out)
117 return out, api.RetvalToVPPApiError(out.Retval)
120 func (c *serviceClient) ApplicationTLSCertAdd(ctx context.Context, in *ApplicationTLSCertAdd) (*ApplicationTLSCertAddReply, error) {
121 out := new(ApplicationTLSCertAddReply)
122 err := c.conn.Invoke(ctx, in, out)
126 return out, api.RetvalToVPPApiError(out.Retval)
129 func (c *serviceClient) ApplicationTLSKeyAdd(ctx context.Context, in *ApplicationTLSKeyAdd) (*ApplicationTLSKeyAddReply, error) {
130 out := new(ApplicationTLSKeyAddReply)
131 err := c.conn.Invoke(ctx, in, out)
135 return out, api.RetvalToVPPApiError(out.Retval)
138 func (c *serviceClient) BindSock(ctx context.Context, in *BindSock) (*BindSockReply, error) {
139 out := new(BindSockReply)
140 err := c.conn.Invoke(ctx, in, out)
144 return out, api.RetvalToVPPApiError(out.Retval)
147 func (c *serviceClient) BindURI(ctx context.Context, in *BindURI) (*BindURIReply, error) {
148 out := new(BindURIReply)
149 err := c.conn.Invoke(ctx, in, out)
153 return out, api.RetvalToVPPApiError(out.Retval)
156 func (c *serviceClient) ConnectSock(ctx context.Context, in *ConnectSock) (*ConnectSockReply, error) {
157 out := new(ConnectSockReply)
158 err := c.conn.Invoke(ctx, in, out)
162 return out, api.RetvalToVPPApiError(out.Retval)
165 func (c *serviceClient) ConnectURI(ctx context.Context, in *ConnectURI) (*ConnectURIReply, error) {
166 out := new(ConnectURIReply)
167 err := c.conn.Invoke(ctx, in, out)
171 return out, api.RetvalToVPPApiError(out.Retval)
174 func (c *serviceClient) DisconnectSession(ctx context.Context, in *DisconnectSession) (*DisconnectSessionReply, error) {
175 out := new(DisconnectSessionReply)
176 err := c.conn.Invoke(ctx, in, out)
180 return out, api.RetvalToVPPApiError(out.Retval)
183 func (c *serviceClient) MapAnotherSegment(ctx context.Context, in *MapAnotherSegment) (*MapAnotherSegmentReply, error) {
184 out := new(MapAnotherSegmentReply)
185 err := c.conn.Invoke(ctx, in, out)
189 return out, api.RetvalToVPPApiError(out.Retval)
192 func (c *serviceClient) SessionEnableDisable(ctx context.Context, in *SessionEnableDisable) (*SessionEnableDisableReply, error) {
193 out := new(SessionEnableDisableReply)
194 err := c.conn.Invoke(ctx, in, out)
198 return out, api.RetvalToVPPApiError(out.Retval)
201 func (c *serviceClient) SessionRuleAddDel(ctx context.Context, in *SessionRuleAddDel) (*SessionRuleAddDelReply, error) {
202 out := new(SessionRuleAddDelReply)
203 err := c.conn.Invoke(ctx, in, out)
207 return out, api.RetvalToVPPApiError(out.Retval)
210 func (c *serviceClient) SessionRulesDump(ctx context.Context, in *SessionRulesDump) (RPCService_SessionRulesDumpClient, error) {
211 stream, err := c.conn.NewStream(ctx)
215 x := &serviceClient_SessionRulesDumpClient{stream}
216 if err := x.Stream.SendMsg(in); err != nil {
219 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
225 type RPCService_SessionRulesDumpClient interface {
226 Recv() (*SessionRulesDetails, error)
230 type serviceClient_SessionRulesDumpClient struct {
234 func (c *serviceClient_SessionRulesDumpClient) Recv() (*SessionRulesDetails, error) {
235 msg, err := c.Stream.RecvMsg()
239 switch m := msg.(type) {
240 case *SessionRulesDetails:
242 case *vpe.ControlPingReply:
243 err = c.Stream.Close()
249 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
253 func (c *serviceClient) UnbindSock(ctx context.Context, in *UnbindSock) (*UnbindSockReply, error) {
254 out := new(UnbindSockReply)
255 err := c.conn.Invoke(ctx, in, out)
259 return out, api.RetvalToVPPApiError(out.Retval)
262 func (c *serviceClient) UnbindURI(ctx context.Context, in *UnbindURI) (*UnbindURIReply, error) {
263 out := new(UnbindURIReply)
264 err := c.conn.Invoke(ctx, in, out)
268 return out, api.RetvalToVPPApiError(out.Retval)
271 func (c *serviceClient) UnmapSegment(ctx context.Context, in *UnmapSegment) (*UnmapSegmentReply, error) {
272 out := new(UnmapSegmentReply)
273 err := c.conn.Invoke(ctx, in, out)
277 return out, api.RetvalToVPPApiError(out.Retval)