import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/binapi/vpe"
- "io"
)
-// RPCService defines RPC service pot.
+// RPCService defines RPC service pot.
type RPCService interface {
PotProfileActivate(ctx context.Context, in *PotProfileActivate) (*PotProfileActivateReply, error)
PotProfileAdd(ctx context.Context, in *PotProfileAdd) (*PotProfileAddReply, error)
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) PotProfileAdd(ctx context.Context, in *PotProfileAdd) (*PotProfileAddReply, error) {
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) PotProfileDel(ctx context.Context, in *PotProfileDel) (*PotProfileDelReply, error) {
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) PotProfileShowConfigDump(ctx context.Context, in *PotProfileShowConfigDump) (RPCService_PotProfileShowConfigDumpClient, error) {
case *PotProfileShowConfigDetails:
return m, nil
case *vpe.ControlPingReply:
+ err = c.Stream.Close()
+ if err != nil {
+ return nil, err
+ }
return nil, io.EOF
default:
return nil, fmt.Errorf("unexpected message: %T %v", m, m)