mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-02 20:06:03 +02:00
21 lines
575 B
Go
21 lines
575 B
Go
package controller
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/pomerium/pomerium/internal/zero/reconciler"
|
|
"github.com/pomerium/pomerium/pkg/grpc/databroker"
|
|
)
|
|
|
|
func (c *controller) RunReconciler(ctx context.Context) error {
|
|
leaser := databroker.NewLeaser("zero-reconciler", c.cfg.reconcilerLeaseDuration, c)
|
|
return leaser.Run(ctx)
|
|
}
|
|
|
|
// RunLeased implements the databroker.Leaser interface.
|
|
func (c *controller) RunLeased(ctx context.Context) error {
|
|
return reconciler.Run(ctx,
|
|
reconciler.WithAPI(c.api),
|
|
reconciler.WithDataBrokerClient(c.GetDataBrokerServiceClient()),
|
|
)
|
|
}
|