mirror of
https://github.com/pomerium/pomerium.git
synced 2025-07-27 21:49:12 +02:00
merge main, wire with rest of funcs
This commit is contained in:
parent
74c5bfbbd8
commit
c945b08bcf
4 changed files with 83 additions and 24 deletions
|
@ -13,12 +13,10 @@ import (
|
|||
sdk "github.com/pomerium/pomerium/internal/zero/api"
|
||||
"github.com/pomerium/pomerium/internal/zero/bootstrap"
|
||||
"github.com/pomerium/pomerium/internal/zero/bootstrap/writers"
|
||||
connect_mux "github.com/pomerium/pomerium/internal/zero/connect-mux"
|
||||
"github.com/pomerium/pomerium/internal/zero/reconciler"
|
||||
"github.com/pomerium/pomerium/internal/zero/telemetry/reporter"
|
||||
"github.com/pomerium/pomerium/pkg/cmd/pomerium"
|
||||
"github.com/pomerium/pomerium/pkg/grpc/databroker"
|
||||
"github.com/pomerium/pomerium/pkg/zero/connect"
|
||||
)
|
||||
|
||||
// Run runs Pomerium is managed mode using the provided token.
|
||||
|
@ -140,13 +138,6 @@ func (c *controller) runZeroControlLoop(ctx context.Context) error {
|
|||
}
|
||||
defer c.shutdownTelemetry(ctx)
|
||||
|
||||
err = c.api.Watch(ctx, connect_mux.WithOnTelemetryRequested(func(ctx context.Context, _ *connect.TelemetryRequest) {
|
||||
c.telemetryReporter.CollectAndExportMetrics(ctx)
|
||||
}))
|
||||
if err != nil {
|
||||
return fmt.Errorf("watch telemetry: %w", err)
|
||||
}
|
||||
|
||||
eg, ctx := errgroup.WithContext(ctx)
|
||||
eg.Go(func() error {
|
||||
return r.Run(ctx,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue