d5aa97054daf03e0f734b238b9a81e3c010f5458
[govpp.git] / internal / testbinapi / binapi2001 / sctp / sctp_rpc.ba.go
1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
2
3 package sctp
4
5 import (
6         "context"
7         api "git.fd.io/govpp.git/api"
8 )
9
10 // RPCService defines RPC service  sctp.
11 type RPCService interface {
12         SctpAddSrcDstConnection(ctx context.Context, in *SctpAddSrcDstConnection) (*SctpAddSrcDstConnectionReply, error)
13         SctpConfig(ctx context.Context, in *SctpConfig) (*SctpConfigReply, error)
14         SctpDelSrcDstConnection(ctx context.Context, in *SctpDelSrcDstConnection) (*SctpDelSrcDstConnectionReply, error)
15 }
16
17 type serviceClient struct {
18         conn api.Connection
19 }
20
21 func NewServiceClient(conn api.Connection) RPCService {
22         return &serviceClient{conn}
23 }
24
25 func (c *serviceClient) SctpAddSrcDstConnection(ctx context.Context, in *SctpAddSrcDstConnection) (*SctpAddSrcDstConnectionReply, error) {
26         out := new(SctpAddSrcDstConnectionReply)
27         err := c.conn.Invoke(ctx, in, out)
28         if err != nil {
29                 return nil, err
30         }
31         return out, nil
32 }
33
34 func (c *serviceClient) SctpConfig(ctx context.Context, in *SctpConfig) (*SctpConfigReply, error) {
35         out := new(SctpConfigReply)
36         err := c.conn.Invoke(ctx, in, out)
37         if err != nil {
38                 return nil, err
39         }
40         return out, nil
41 }
42
43 func (c *serviceClient) SctpDelSrcDstConnection(ctx context.Context, in *SctpDelSrcDstConnection) (*SctpDelSrcDstConnectionReply, error) {
44         out := new(SctpDelSrcDstConnectionReply)
45         err := c.conn.Invoke(ctx, in, out)
46         if err != nil {
47                 return nil, err
48         }
49         return out, nil
50 }