1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
8 api "git.fd.io/govpp.git/api"
9 vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
13 // RPCService defines RPC service session.
14 type RPCService interface {
15 AppAddCertKeyPair(ctx context.Context, in *AppAddCertKeyPair) (*AppAddCertKeyPairReply, error)
16 AppAttach(ctx context.Context, in *AppAttach) (*AppAttachReply, error)
17 AppCutThroughRegistrationAdd(ctx context.Context, in *AppCutThroughRegistrationAdd) (*AppCutThroughRegistrationAddReply, error)
18 AppDelCertKeyPair(ctx context.Context, in *AppDelCertKeyPair) (*AppDelCertKeyPairReply, error)
19 AppNamespaceAddDel(ctx context.Context, in *AppNamespaceAddDel) (*AppNamespaceAddDelReply, error)
20 AppWorkerAddDel(ctx context.Context, in *AppWorkerAddDel) (*AppWorkerAddDelReply, error)
21 ApplicationAttach(ctx context.Context, in *ApplicationAttach) (*ApplicationAttachReply, error)
22 ApplicationDetach(ctx context.Context, in *ApplicationDetach) (*ApplicationDetachReply, error)
23 ApplicationTLSCertAdd(ctx context.Context, in *ApplicationTLSCertAdd) (*ApplicationTLSCertAddReply, error)
24 ApplicationTLSKeyAdd(ctx context.Context, in *ApplicationTLSKeyAdd) (*ApplicationTLSKeyAddReply, error)
25 BindSock(ctx context.Context, in *BindSock) (*BindSockReply, error)
26 BindURI(ctx context.Context, in *BindURI) (*BindURIReply, error)
27 ConnectSock(ctx context.Context, in *ConnectSock) (*ConnectSockReply, error)
28 ConnectURI(ctx context.Context, in *ConnectURI) (*ConnectURIReply, error)
29 DisconnectSession(ctx context.Context, in *DisconnectSession) (*DisconnectSessionReply, error)
30 MapAnotherSegment(ctx context.Context, in *MapAnotherSegment) (*MapAnotherSegmentReply, error)
31 SessionEnableDisable(ctx context.Context, in *SessionEnableDisable) (*SessionEnableDisableReply, error)
32 SessionRuleAddDel(ctx context.Context, in *SessionRuleAddDel) (*SessionRuleAddDelReply, error)
33 SessionRulesDump(ctx context.Context, in *SessionRulesDump) (RPCService_SessionRulesDumpClient, error)
34 UnbindSock(ctx context.Context, in *UnbindSock) (*UnbindSockReply, error)
35 UnbindURI(ctx context.Context, in *UnbindURI) (*UnbindURIReply, error)
36 UnmapSegment(ctx context.Context, in *UnmapSegment) (*UnmapSegmentReply, error)
39 type serviceClient struct {
43 func NewServiceClient(conn api.Connection) RPCService {
44 return &serviceClient{conn}
47 func (c *serviceClient) AppAddCertKeyPair(ctx context.Context, in *AppAddCertKeyPair) (*AppAddCertKeyPairReply, error) {
48 out := new(AppAddCertKeyPairReply)
49 err := c.conn.Invoke(ctx, in, out)
56 func (c *serviceClient) AppAttach(ctx context.Context, in *AppAttach) (*AppAttachReply, error) {
57 out := new(AppAttachReply)
58 err := c.conn.Invoke(ctx, in, out)
65 func (c *serviceClient) AppCutThroughRegistrationAdd(ctx context.Context, in *AppCutThroughRegistrationAdd) (*AppCutThroughRegistrationAddReply, error) {
66 out := new(AppCutThroughRegistrationAddReply)
67 err := c.conn.Invoke(ctx, in, out)
74 func (c *serviceClient) AppDelCertKeyPair(ctx context.Context, in *AppDelCertKeyPair) (*AppDelCertKeyPairReply, error) {
75 out := new(AppDelCertKeyPairReply)
76 err := c.conn.Invoke(ctx, in, out)
83 func (c *serviceClient) AppNamespaceAddDel(ctx context.Context, in *AppNamespaceAddDel) (*AppNamespaceAddDelReply, error) {
84 out := new(AppNamespaceAddDelReply)
85 err := c.conn.Invoke(ctx, in, out)
92 func (c *serviceClient) AppWorkerAddDel(ctx context.Context, in *AppWorkerAddDel) (*AppWorkerAddDelReply, error) {
93 out := new(AppWorkerAddDelReply)
94 err := c.conn.Invoke(ctx, in, out)
101 func (c *serviceClient) ApplicationAttach(ctx context.Context, in *ApplicationAttach) (*ApplicationAttachReply, error) {
102 out := new(ApplicationAttachReply)
103 err := c.conn.Invoke(ctx, in, out)
110 func (c *serviceClient) ApplicationDetach(ctx context.Context, in *ApplicationDetach) (*ApplicationDetachReply, error) {
111 out := new(ApplicationDetachReply)
112 err := c.conn.Invoke(ctx, in, out)
119 func (c *serviceClient) ApplicationTLSCertAdd(ctx context.Context, in *ApplicationTLSCertAdd) (*ApplicationTLSCertAddReply, error) {
120 out := new(ApplicationTLSCertAddReply)
121 err := c.conn.Invoke(ctx, in, out)
128 func (c *serviceClient) ApplicationTLSKeyAdd(ctx context.Context, in *ApplicationTLSKeyAdd) (*ApplicationTLSKeyAddReply, error) {
129 out := new(ApplicationTLSKeyAddReply)
130 err := c.conn.Invoke(ctx, in, out)
137 func (c *serviceClient) BindSock(ctx context.Context, in *BindSock) (*BindSockReply, error) {
138 out := new(BindSockReply)
139 err := c.conn.Invoke(ctx, in, out)
146 func (c *serviceClient) BindURI(ctx context.Context, in *BindURI) (*BindURIReply, error) {
147 out := new(BindURIReply)
148 err := c.conn.Invoke(ctx, in, out)
155 func (c *serviceClient) ConnectSock(ctx context.Context, in *ConnectSock) (*ConnectSockReply, error) {
156 out := new(ConnectSockReply)
157 err := c.conn.Invoke(ctx, in, out)
164 func (c *serviceClient) ConnectURI(ctx context.Context, in *ConnectURI) (*ConnectURIReply, error) {
165 out := new(ConnectURIReply)
166 err := c.conn.Invoke(ctx, in, out)
173 func (c *serviceClient) DisconnectSession(ctx context.Context, in *DisconnectSession) (*DisconnectSessionReply, error) {
174 out := new(DisconnectSessionReply)
175 err := c.conn.Invoke(ctx, in, out)
182 func (c *serviceClient) MapAnotherSegment(ctx context.Context, in *MapAnotherSegment) (*MapAnotherSegmentReply, error) {
183 out := new(MapAnotherSegmentReply)
184 err := c.conn.Invoke(ctx, in, out)
191 func (c *serviceClient) SessionEnableDisable(ctx context.Context, in *SessionEnableDisable) (*SessionEnableDisableReply, error) {
192 out := new(SessionEnableDisableReply)
193 err := c.conn.Invoke(ctx, in, out)
200 func (c *serviceClient) SessionRuleAddDel(ctx context.Context, in *SessionRuleAddDel) (*SessionRuleAddDelReply, error) {
201 out := new(SessionRuleAddDelReply)
202 err := c.conn.Invoke(ctx, in, out)
209 func (c *serviceClient) SessionRulesDump(ctx context.Context, in *SessionRulesDump) (RPCService_SessionRulesDumpClient, error) {
210 stream, err := c.conn.NewStream(ctx)
214 x := &serviceClient_SessionRulesDumpClient{stream}
215 if err := x.Stream.SendMsg(in); err != nil {
218 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
224 type RPCService_SessionRulesDumpClient interface {
225 Recv() (*SessionRulesDetails, error)
229 type serviceClient_SessionRulesDumpClient struct {
233 func (c *serviceClient_SessionRulesDumpClient) Recv() (*SessionRulesDetails, error) {
234 msg, err := c.Stream.RecvMsg()
238 switch m := msg.(type) {
239 case *SessionRulesDetails:
241 case *vpe.ControlPingReply:
244 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
248 func (c *serviceClient) UnbindSock(ctx context.Context, in *UnbindSock) (*UnbindSockReply, error) {
249 out := new(UnbindSockReply)
250 err := c.conn.Invoke(ctx, in, out)
257 func (c *serviceClient) UnbindURI(ctx context.Context, in *UnbindURI) (*UnbindURIReply, error) {
258 out := new(UnbindURIReply)
259 err := c.conn.Invoke(ctx, in, out)
266 func (c *serviceClient) UnmapSegment(ctx context.Context, in *UnmapSegment) (*UnmapSegmentReply, error) {
267 out := new(UnmapSegmentReply)
268 err := c.conn.Invoke(ctx, in, out)