mirror of
https://github.com/paralus/paralus.git
synced 2026-05-07 00:46:52 +00:00
* restructure rcloud-base as a single base controller * updated master.rest * moved sentry from internal to pkg as it is used by relay * removing unused rpc and it's dependencies * Fix usermgmt tests * Don't redefine variables in rest file Co-authored-by: Abin Simon <abin.simon@rafay.co>
21 lines
431 B
Go
21 lines
431 B
Go
package server
|
|
|
|
import (
|
|
v3 "github.com/RafaySystems/rcloud-base/proto/types/commonpb/v3"
|
|
|
|
"google.golang.org/protobuf/types/known/timestamppb"
|
|
)
|
|
|
|
func getStatus(err error) *v3.Status {
|
|
if err != nil {
|
|
return &v3.Status{
|
|
ConditionStatus: v3.ConditionStatus_StatusFailed,
|
|
LastUpdated: timestamppb.Now(),
|
|
Reason: err.Error(),
|
|
}
|
|
}
|
|
return &v3.Status{
|
|
ConditionStatus: v3.ConditionStatus_StatusOK,
|
|
}
|
|
}
|