DualWriter: remove RV+UID for secondary update (#105543)

This commit is contained in:
Ryan McKinley
2025-05-21 18:25:40 +00:00
committed by GitHub
parent 75d983ccc8
commit 1dd59ca599
3 changed files with 46 additions and 30 deletions
-10
View File
@@ -24,16 +24,6 @@ var (
_ rest.SingularNameProvider = (DualWriter)(nil)
)
type dualWriteContextKey struct{}
func IsDualWriteUpdate(ctx context.Context) bool {
return ctx.Value(dualWriteContextKey{}) == true
}
func WithDualWriteUpdate(ctx context.Context) context.Context {
return context.WithValue(ctx, dualWriteContextKey{}, true)
}
// Function that will create a dual writer
type DualWriteBuilder func(gr schema.GroupResource, legacy Storage, unified Storage) (Storage, error)