X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=binapi%2Fqos%2Fqos_rpc.ba.go;h=c45bbd37f2ba88d1c0d5ba10cfa919bad3781e4d;hb=HEAD;hp=50f6427b544801eee1dfde472fe34ee81f3487d9;hpb=c94a962279858fb13eaacc689f47aed358373e44;p=govpp.git diff --git a/binapi/qos/qos_rpc.ba.go b/binapi/qos/qos_rpc.ba.go index 50f6427..c45bbd3 100644 --- a/binapi/qos/qos_rpc.ba.go +++ b/binapi/qos/qos_rpc.ba.go @@ -7,11 +7,11 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" - vpe "git.fd.io/govpp.git/binapi/vpe" + api "go.fd.io/govpp/api" + memclnt "go.fd.io/govpp/binapi/memclnt" ) -// RPCService defines RPC service qos. +// RPCService defines RPC service qos. type RPCService interface { QosEgressMapDelete(ctx context.Context, in *QosEgressMapDelete) (*QosEgressMapDeleteReply, error) QosEgressMapDump(ctx context.Context, in *QosEgressMapDump) (RPCService_QosEgressMapDumpClient, error) @@ -38,7 +38,7 @@ func (c *serviceClient) QosEgressMapDelete(ctx context.Context, in *QosEgressMap if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) QosEgressMapDump(ctx context.Context, in *QosEgressMapDump) (RPCService_QosEgressMapDumpClient, error) { @@ -50,7 +50,7 @@ func (c *serviceClient) QosEgressMapDump(ctx context.Context, in *QosEgressMapDu if err := x.Stream.SendMsg(in); err != nil { return nil, err } - if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil { return nil, err } return x, nil @@ -73,7 +73,11 @@ func (c *serviceClient_QosEgressMapDumpClient) Recv() (*QosEgressMapDetails, err switch m := msg.(type) { case *QosEgressMapDetails: return m, nil - case *vpe.ControlPingReply: + case *memclnt.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) @@ -86,7 +90,7 @@ func (c *serviceClient) QosEgressMapUpdate(ctx context.Context, in *QosEgressMap if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) QosMarkDump(ctx context.Context, in *QosMarkDump) (RPCService_QosMarkDumpClient, error) { @@ -98,7 +102,7 @@ func (c *serviceClient) QosMarkDump(ctx context.Context, in *QosMarkDump) (RPCSe if err := x.Stream.SendMsg(in); err != nil { return nil, err } - if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil { return nil, err } return x, nil @@ -121,7 +125,11 @@ func (c *serviceClient_QosMarkDumpClient) Recv() (*QosMarkDetails, error) { switch m := msg.(type) { case *QosMarkDetails: return m, nil - case *vpe.ControlPingReply: + case *memclnt.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) @@ -134,7 +142,7 @@ func (c *serviceClient) QosMarkEnableDisable(ctx context.Context, in *QosMarkEna if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) QosRecordDump(ctx context.Context, in *QosRecordDump) (RPCService_QosRecordDumpClient, error) { @@ -146,7 +154,7 @@ func (c *serviceClient) QosRecordDump(ctx context.Context, in *QosRecordDump) (R if err := x.Stream.SendMsg(in); err != nil { return nil, err } - if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil { return nil, err } return x, nil @@ -169,7 +177,11 @@ func (c *serviceClient_QosRecordDumpClient) Recv() (*QosRecordDetails, error) { switch m := msg.(type) { case *QosRecordDetails: return m, nil - case *vpe.ControlPingReply: + case *memclnt.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) @@ -182,7 +194,7 @@ func (c *serviceClient) QosRecordEnableDisable(ctx context.Context, in *QosRecor if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) QosStoreDump(ctx context.Context, in *QosStoreDump) (RPCService_QosStoreDumpClient, error) { @@ -194,7 +206,7 @@ func (c *serviceClient) QosStoreDump(ctx context.Context, in *QosStoreDump) (RPC if err := x.Stream.SendMsg(in); err != nil { return nil, err } - if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil { return nil, err } return x, nil @@ -217,7 +229,11 @@ func (c *serviceClient_QosStoreDumpClient) Recv() (*QosStoreDetails, error) { switch m := msg.(type) { case *QosStoreDetails: return m, nil - case *vpe.ControlPingReply: + case *memclnt.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) @@ -230,5 +246,5 @@ func (c *serviceClient) QosStoreEnableDisable(ctx context.Context, in *QosStoreE if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) }