Introduce Comparator interface (#88016)

* Introduce Comparator interface

* Add compare implementation everywhere

* Add comment explaining what Compare should do

* Lint
This commit is contained in:
Leonor Oliveira
2024-05-29 09:42:24 +02:00
committed by GitHub
parent 06304894a1
commit ade96dbdbd
13 changed files with 136 additions and 52 deletions
+6
View File
@@ -60,3 +60,9 @@ func newStorage(scheme *runtime.Scheme, optsGetter generic.RESTOptionsGetter) (*
}
return &storage{Store: store}, nil
}
// Compare asserts on the equality of objects returned from both stores (object storage and legacy storage)
func (s *storage) Compare(storageObj, legacyObj runtime.Object) bool {
//TODO: define the comparison logic between a generic object returned by the storage and a generic object returned by the legacy storage
return false
}