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/binapi/vpe"
14 // RPCService defines RPC service pot.
15 type RPCService interface {
16 PotProfileActivate(ctx context.Context, in *PotProfileActivate) (*PotProfileActivateReply, error)
17 PotProfileAdd(ctx context.Context, in *PotProfileAdd) (*PotProfileAddReply, error)
18 PotProfileDel(ctx context.Context, in *PotProfileDel) (*PotProfileDelReply, error)
19 PotProfileShowConfigDump(ctx context.Context, in *PotProfileShowConfigDump) (RPCService_PotProfileShowConfigDumpClient, error)
22 type serviceClient struct {
26 func NewServiceClient(conn api.Connection) RPCService {
27 return &serviceClient{conn}
30 func (c *serviceClient) PotProfileActivate(ctx context.Context, in *PotProfileActivate) (*PotProfileActivateReply, error) {
31 out := new(PotProfileActivateReply)
32 err := c.conn.Invoke(ctx, in, out)
36 return out, api.RetvalToVPPApiError(out.Retval)
39 func (c *serviceClient) PotProfileAdd(ctx context.Context, in *PotProfileAdd) (*PotProfileAddReply, error) {
40 out := new(PotProfileAddReply)
41 err := c.conn.Invoke(ctx, in, out)
45 return out, api.RetvalToVPPApiError(out.Retval)
48 func (c *serviceClient) PotProfileDel(ctx context.Context, in *PotProfileDel) (*PotProfileDelReply, error) {
49 out := new(PotProfileDelReply)
50 err := c.conn.Invoke(ctx, in, out)
54 return out, api.RetvalToVPPApiError(out.Retval)
57 func (c *serviceClient) PotProfileShowConfigDump(ctx context.Context, in *PotProfileShowConfigDump) (RPCService_PotProfileShowConfigDumpClient, error) {
58 stream, err := c.conn.NewStream(ctx)
62 x := &serviceClient_PotProfileShowConfigDumpClient{stream}
63 if err := x.Stream.SendMsg(in); err != nil {
66 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
72 type RPCService_PotProfileShowConfigDumpClient interface {
73 Recv() (*PotProfileShowConfigDetails, error)
77 type serviceClient_PotProfileShowConfigDumpClient struct {
81 func (c *serviceClient_PotProfileShowConfigDumpClient) Recv() (*PotProfileShowConfigDetails, error) {
82 msg, err := c.Stream.RecvMsg()
86 switch m := msg.(type) {
87 case *PotProfileShowConfigDetails:
89 case *vpe.ControlPingReply:
90 err = c.Stream.Close()
96 return nil, fmt.Errorf("unexpected message: %T %v", m, m)