internal/pagination: add new purge package

The purge package contains a job that is used to purge
records from the foo_deleted tables when they become
older than 30 days.
This commit is contained in:
Johan Brandhorst-Satzkorn committed 2024-01-05 07:43:19 -08:00
1 parent 78541ad05e
commit 7c996d0e02
5 files changed
+265

No files matched your search

+4
View File
@@ -33,6 +33,7 @@ import (
"github.com/hashicorp/boundary/internal/iam"
"github.com/hashicorp/boundary/internal/kms"
kmsjob "github.com/hashicorp/boundary/internal/kms/job"
"github.com/hashicorp/boundary/internal/pagination/purge"
"github.com/hashicorp/boundary/internal/plugin"
"github.com/hashicorp/boundary/internal/plugin/loopback"
"github.com/hashicorp/boundary/internal/ratelimit"
@@ -596,6 +597,9 @@ func (c *Controller) registerJobs() error {
if err := census.RegisterJob(c.baseContext, c.scheduler, c.conf.RawConfig.Reporting.License.Enabled, rw, rw); err != nil {
return err
}
if err := purge.RegisterJobs(c.baseContext, c.scheduler, rw, rw); err != nil {
return err
}
return nil
}