mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-01 16:01:26 +02:00
zero: managed mode controller (#4459)
This commit is contained in:
parent
ea8762d706
commit
e0236d3737
11 changed files with 417 additions and 2 deletions
21
internal/zero/controller/reconciler.go
Normal file
21
internal/zero/controller/reconciler.go
Normal file
|
@ -0,0 +1,21 @@
|
|||
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()),
|
||||
)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue