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 pot.
14 type RPCService interface {
15 PotProfileActivate(ctx context.Context, in *PotProfileActivate) (*PotProfileActivateReply, error)
16 PotProfileAdd(ctx context.Context, in *PotProfileAdd) (*PotProfileAddReply, error)
17 PotProfileDel(ctx context.Context, in *PotProfileDel) (*PotProfileDelReply, error)
18 PotProfileShowConfigDump(ctx context.Context, in *PotProfileShowConfigDump) (RPCService_PotProfileShowConfigDumpClient, error)
21 type serviceClient struct {
25 func NewServiceClient(conn api.Connection) RPCService {
26 return &serviceClient{conn}
29 func (c *serviceClient) PotProfileActivate(ctx context.Context, in *PotProfileActivate) (*PotProfileActivateReply, error) {
30 out := new(PotProfileActivateReply)
31 err := c.conn.Invoke(ctx, in, out)
38 func (c *serviceClient) PotProfileAdd(ctx context.Context, in *PotProfileAdd) (*PotProfileAddReply, error) {
39 out := new(PotProfileAddReply)
40 err := c.conn.Invoke(ctx, in, out)
47 func (c *serviceClient) PotProfileDel(ctx context.Context, in *PotProfileDel) (*PotProfileDelReply, error) {
48 out := new(PotProfileDelReply)
49 err := c.conn.Invoke(ctx, in, out)
56 func (c *serviceClient) PotProfileShowConfigDump(ctx context.Context, in *PotProfileShowConfigDump) (RPCService_PotProfileShowConfigDumpClient, error) {
57 stream, err := c.conn.NewStream(ctx)
61 x := &serviceClient_PotProfileShowConfigDumpClient{stream}
62 if err := x.Stream.SendMsg(in); err != nil {
65 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
71 type RPCService_PotProfileShowConfigDumpClient interface {
72 Recv() (*PotProfileShowConfigDetails, error)
76 type serviceClient_PotProfileShowConfigDumpClient struct {
80 func (c *serviceClient_PotProfileShowConfigDumpClient) Recv() (*PotProfileShowConfigDetails, error) {
81 msg, err := c.Stream.RecvMsg()
85 switch m := msg.(type) {
86 case *PotProfileShowConfigDetails:
88 case *vpe.ControlPingReply:
91 return nil, fmt.Errorf("unexpected message: %T %v", m, m)