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>
19 lines
301 B
Go
19 lines
301 B
Go
package reconcile
|
|
|
|
import (
|
|
"encoding/json"
|
|
|
|
"github.com/RafaySystems/rcloud-base/pkg/event"
|
|
)
|
|
|
|
func resourceToKey(r event.Resource) string {
|
|
b, _ := json.Marshal(r)
|
|
return string(b)
|
|
}
|
|
|
|
func keyToResource(k string) event.Resource {
|
|
var r event.Resource
|
|
json.Unmarshal([]byte(k), &r)
|
|
return r
|
|
}
|