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/binapi/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 AppDelCertKeyPair(ctx context.Context, in *AppDelCertKeyPair) (*AppDelCertKeyPairReply, error)
18 AppNamespaceAddDel(ctx context.Context, in *AppNamespaceAddDel) (*AppNamespaceAddDelReply, error)
19 AppWorkerAddDel(ctx context.Context, in *AppWorkerAddDel) (*AppWorkerAddDelReply, error)
20 ApplicationDetach(ctx context.Context, in *ApplicationDetach) (*ApplicationDetachReply, error)
21 ApplicationTLSCertAdd(ctx context.Context, in *ApplicationTLSCertAdd) (*ApplicationTLSCertAddReply, error)
22 ApplicationTLSKeyAdd(ctx context.Context, in *ApplicationTLSKeyAdd) (*ApplicationTLSKeyAddReply, error)
23 SessionEnableDisable(ctx context.Context, in *SessionEnableDisable) (*SessionEnableDisableReply, error)
24 SessionRuleAddDel(ctx context.Context, in *SessionRuleAddDel) (*SessionRuleAddDelReply, error)
25 SessionRulesDump(ctx context.Context, in *SessionRulesDump) (RPCService_SessionRulesDumpClient, error)
28 type serviceClient struct {
32 func NewServiceClient(conn api.Connection) RPCService {
33 return &serviceClient{conn}
36 func (c *serviceClient) AppAddCertKeyPair(ctx context.Context, in *AppAddCertKeyPair) (*AppAddCertKeyPairReply, error) {
37 out := new(AppAddCertKeyPairReply)
38 err := c.conn.Invoke(ctx, in, out)
45 func (c *serviceClient) AppAttach(ctx context.Context, in *AppAttach) (*AppAttachReply, error) {
46 out := new(AppAttachReply)
47 err := c.conn.Invoke(ctx, in, out)
54 func (c *serviceClient) AppDelCertKeyPair(ctx context.Context, in *AppDelCertKeyPair) (*AppDelCertKeyPairReply, error) {
55 out := new(AppDelCertKeyPairReply)
56 err := c.conn.Invoke(ctx, in, out)
63 func (c *serviceClient) AppNamespaceAddDel(ctx context.Context, in *AppNamespaceAddDel) (*AppNamespaceAddDelReply, error) {
64 out := new(AppNamespaceAddDelReply)
65 err := c.conn.Invoke(ctx, in, out)
72 func (c *serviceClient) AppWorkerAddDel(ctx context.Context, in *AppWorkerAddDel) (*AppWorkerAddDelReply, error) {
73 out := new(AppWorkerAddDelReply)
74 err := c.conn.Invoke(ctx, in, out)
81 func (c *serviceClient) ApplicationDetach(ctx context.Context, in *ApplicationDetach) (*ApplicationDetachReply, error) {
82 out := new(ApplicationDetachReply)
83 err := c.conn.Invoke(ctx, in, out)
90 func (c *serviceClient) ApplicationTLSCertAdd(ctx context.Context, in *ApplicationTLSCertAdd) (*ApplicationTLSCertAddReply, error) {
91 out := new(ApplicationTLSCertAddReply)
92 err := c.conn.Invoke(ctx, in, out)
99 func (c *serviceClient) ApplicationTLSKeyAdd(ctx context.Context, in *ApplicationTLSKeyAdd) (*ApplicationTLSKeyAddReply, error) {
100 out := new(ApplicationTLSKeyAddReply)
101 err := c.conn.Invoke(ctx, in, out)
108 func (c *serviceClient) SessionEnableDisable(ctx context.Context, in *SessionEnableDisable) (*SessionEnableDisableReply, error) {
109 out := new(SessionEnableDisableReply)
110 err := c.conn.Invoke(ctx, in, out)
117 func (c *serviceClient) SessionRuleAddDel(ctx context.Context, in *SessionRuleAddDel) (*SessionRuleAddDelReply, error) {
118 out := new(SessionRuleAddDelReply)
119 err := c.conn.Invoke(ctx, in, out)
126 func (c *serviceClient) SessionRulesDump(ctx context.Context, in *SessionRulesDump) (RPCService_SessionRulesDumpClient, error) {
127 stream, err := c.conn.NewStream(ctx)
131 x := &serviceClient_SessionRulesDumpClient{stream}
132 if err := x.Stream.SendMsg(in); err != nil {
135 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
141 type RPCService_SessionRulesDumpClient interface {
142 Recv() (*SessionRulesDetails, error)
146 type serviceClient_SessionRulesDumpClient struct {
150 func (c *serviceClient_SessionRulesDumpClient) Recv() (*SessionRulesDetails, error) {
151 msg, err := c.Stream.RecvMsg()
155 switch m := msg.(type) {
156 case *SessionRulesDetails:
158 case *vpe.ControlPingReply:
161 return nil, fmt.Errorf("unexpected message: %T %v", m, m)