1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
10 api "go.fd.io/govpp/api"
11 memclnt "go.fd.io/govpp/binapi/memclnt"
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 AppDelCertKeyPair(ctx context.Context, in *AppDelCertKeyPair) (*AppDelCertKeyPairReply, error)
19 AppNamespaceAddDel(ctx context.Context, in *AppNamespaceAddDel) (*AppNamespaceAddDelReply, error)
20 AppNamespaceAddDelV2(ctx context.Context, in *AppNamespaceAddDelV2) (*AppNamespaceAddDelV2Reply, error)
21 AppNamespaceAddDelV3(ctx context.Context, in *AppNamespaceAddDelV3) (*AppNamespaceAddDelV3Reply, error)
22 AppWorkerAddDel(ctx context.Context, in *AppWorkerAddDel) (*AppWorkerAddDelReply, 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 SessionEnableDisable(ctx context.Context, in *SessionEnableDisable) (*SessionEnableDisableReply, error)
27 SessionRuleAddDel(ctx context.Context, in *SessionRuleAddDel) (*SessionRuleAddDelReply, error)
28 SessionRulesDump(ctx context.Context, in *SessionRulesDump) (RPCService_SessionRulesDumpClient, error)
29 SessionSapiEnableDisable(ctx context.Context, in *SessionSapiEnableDisable) (*SessionSapiEnableDisableReply, error)
32 type serviceClient struct {
36 func NewServiceClient(conn api.Connection) RPCService {
37 return &serviceClient{conn}
40 func (c *serviceClient) AppAddCertKeyPair(ctx context.Context, in *AppAddCertKeyPair) (*AppAddCertKeyPairReply, error) {
41 out := new(AppAddCertKeyPairReply)
42 err := c.conn.Invoke(ctx, in, out)
46 return out, api.RetvalToVPPApiError(out.Retval)
49 func (c *serviceClient) AppAttach(ctx context.Context, in *AppAttach) (*AppAttachReply, error) {
50 out := new(AppAttachReply)
51 err := c.conn.Invoke(ctx, in, out)
55 return out, api.RetvalToVPPApiError(out.Retval)
58 func (c *serviceClient) AppDelCertKeyPair(ctx context.Context, in *AppDelCertKeyPair) (*AppDelCertKeyPairReply, error) {
59 out := new(AppDelCertKeyPairReply)
60 err := c.conn.Invoke(ctx, in, out)
64 return out, api.RetvalToVPPApiError(out.Retval)
67 func (c *serviceClient) AppNamespaceAddDel(ctx context.Context, in *AppNamespaceAddDel) (*AppNamespaceAddDelReply, error) {
68 out := new(AppNamespaceAddDelReply)
69 err := c.conn.Invoke(ctx, in, out)
73 return out, api.RetvalToVPPApiError(out.Retval)
76 func (c *serviceClient) AppNamespaceAddDelV2(ctx context.Context, in *AppNamespaceAddDelV2) (*AppNamespaceAddDelV2Reply, error) {
77 out := new(AppNamespaceAddDelV2Reply)
78 err := c.conn.Invoke(ctx, in, out)
82 return out, api.RetvalToVPPApiError(out.Retval)
85 func (c *serviceClient) AppNamespaceAddDelV3(ctx context.Context, in *AppNamespaceAddDelV3) (*AppNamespaceAddDelV3Reply, error) {
86 out := new(AppNamespaceAddDelV3Reply)
87 err := c.conn.Invoke(ctx, in, out)
91 return out, api.RetvalToVPPApiError(out.Retval)
94 func (c *serviceClient) AppWorkerAddDel(ctx context.Context, in *AppWorkerAddDel) (*AppWorkerAddDelReply, error) {
95 out := new(AppWorkerAddDelReply)
96 err := c.conn.Invoke(ctx, in, out)
100 return out, api.RetvalToVPPApiError(out.Retval)
103 func (c *serviceClient) ApplicationDetach(ctx context.Context, in *ApplicationDetach) (*ApplicationDetachReply, error) {
104 out := new(ApplicationDetachReply)
105 err := c.conn.Invoke(ctx, in, out)
109 return out, api.RetvalToVPPApiError(out.Retval)
112 func (c *serviceClient) ApplicationTLSCertAdd(ctx context.Context, in *ApplicationTLSCertAdd) (*ApplicationTLSCertAddReply, error) {
113 out := new(ApplicationTLSCertAddReply)
114 err := c.conn.Invoke(ctx, in, out)
118 return out, api.RetvalToVPPApiError(out.Retval)
121 func (c *serviceClient) ApplicationTLSKeyAdd(ctx context.Context, in *ApplicationTLSKeyAdd) (*ApplicationTLSKeyAddReply, error) {
122 out := new(ApplicationTLSKeyAddReply)
123 err := c.conn.Invoke(ctx, in, out)
127 return out, api.RetvalToVPPApiError(out.Retval)
130 func (c *serviceClient) SessionEnableDisable(ctx context.Context, in *SessionEnableDisable) (*SessionEnableDisableReply, error) {
131 out := new(SessionEnableDisableReply)
132 err := c.conn.Invoke(ctx, in, out)
136 return out, api.RetvalToVPPApiError(out.Retval)
139 func (c *serviceClient) SessionRuleAddDel(ctx context.Context, in *SessionRuleAddDel) (*SessionRuleAddDelReply, error) {
140 out := new(SessionRuleAddDelReply)
141 err := c.conn.Invoke(ctx, in, out)
145 return out, api.RetvalToVPPApiError(out.Retval)
148 func (c *serviceClient) SessionRulesDump(ctx context.Context, in *SessionRulesDump) (RPCService_SessionRulesDumpClient, error) {
149 stream, err := c.conn.NewStream(ctx)
153 x := &serviceClient_SessionRulesDumpClient{stream}
154 if err := x.Stream.SendMsg(in); err != nil {
157 if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
163 type RPCService_SessionRulesDumpClient interface {
164 Recv() (*SessionRulesDetails, error)
168 type serviceClient_SessionRulesDumpClient struct {
172 func (c *serviceClient_SessionRulesDumpClient) Recv() (*SessionRulesDetails, error) {
173 msg, err := c.Stream.RecvMsg()
177 switch m := msg.(type) {
178 case *SessionRulesDetails:
180 case *memclnt.ControlPingReply:
181 err = c.Stream.Close()
187 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
191 func (c *serviceClient) SessionSapiEnableDisable(ctx context.Context, in *SessionSapiEnableDisable) (*SessionSapiEnableDisableReply, error) {
192 out := new(SessionSapiEnableDisableReply)
193 err := c.conn.Invoke(ctx, in, out)
197 return out, api.RetvalToVPPApiError(out.Retval)