mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-03 04:16:03 +02:00
24 lines
734 B
Go
24 lines
734 B
Go
package controller
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/pomerium/pomerium/internal/log"
|
|
"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 {
|
|
log.Ctx(ctx).Info().Msg("starting reconciler")
|
|
return reconciler.Run(ctx,
|
|
reconciler.WithClusterAPIClient(c.clusterClient),
|
|
reconciler.WithConnectMux(c.connectMux),
|
|
reconciler.WithDataBrokerClient(c.GetDataBrokerServiceClient()),
|
|
)
|
|
}
|