mirror of
https://github.com/paralus/paralus.git
synced 2026-02-14 17:49:51 +00:00
19 lines
292 B
Go
19 lines
292 B
Go
package reconcile
|
|
|
|
import (
|
|
"encoding/json"
|
|
|
|
"github.com/paralus/paralus/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
|
|
}
|