Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteOrphanedObjects ¶
func DeleteOrphanedObjects( ctx context.Context, apiManipulator manipulate.Manipulator, m manipulate.TransactionalManipulator, identities []elemental.Identity, ) error
DeleteOrphanedObjects deletes the objects with the given identities that are not in any of the given namespaces.
func ScheduleOrphanedObjectsDeleteJob ¶
func ScheduleOrphanedObjectsDeleteJob( ctx context.Context, nsm manipulate.Manipulator, m manipulate.TransactionalManipulator, identities []elemental.Identity, period time.Duration, )
ScheduleOrphanedObjectsDeleteJob periodically cleans objects that lives in a deleted namespace. It takes 2 manipulators. The first one is used to perform object cleanup in the database. The other is used to retrieve the list of existing namespaces. The job will remove all the identities provided by the given model manager that have a package set to the given packageName. If package name is set to *, the job will apply to all identities The job will run at the defined period + a random duration between 0 and 1 minute.
Types ¶
This section is empty.