cluster: pass controller ext to authorize conn

Make the controller extension availalbe to the protocol
context constructor.
This commit is contained in:
Johan Brandhorst-Satzkorn authored and Timothy Messier committed 2023-05-31 12:18:13 +00:00
1 parent 5837d6f387
commit ad62df6b36
4 files changed
+106 -16

No files matched your search

+22 -4
View File
@@ -41,8 +41,17 @@ func registerControllerServerCoordinationService(ctx context.Context, c *Control
return fmt.Errorf("%s: server is nil", op)
}
workerService := handlers.NewWorkerServiceServer(c.ServersRepoFn, c.WorkerAuthRepoStorageFn,
c.SessionRepoFn, c.ConnectionRepoFn, c.downstreamWorkers, c.workerStatusUpdateTimes, c.kms, c.livenessTimeToStale)
workerService := handlers.NewWorkerServiceServer(
c.ServersRepoFn,
c.WorkerAuthRepoStorageFn,
c.SessionRepoFn,
c.ConnectionRepoFn,
c.downstreamWorkers,
c.workerStatusUpdateTimes,
c.kms,
c.livenessTimeToStale,
c.ControllerExtension,
)
pbs.RegisterServerCoordinationServiceServer(server, workerService)
return nil
}
@@ -59,8 +68,17 @@ func registerControllerSessionService(ctx context.Context, c *Controller, server
return fmt.Errorf("%s: server is nil", op)
}
workerService := handlers.NewWorkerServiceServer(c.ServersRepoFn, c.WorkerAuthRepoStorageFn,
c.SessionRepoFn, c.ConnectionRepoFn, c.downstreamWorkers, c.workerStatusUpdateTimes, c.kms, c.livenessTimeToStale)
workerService := handlers.NewWorkerServiceServer(
c.ServersRepoFn,
c.WorkerAuthRepoStorageFn,
c.SessionRepoFn,
c.ConnectionRepoFn,
c.downstreamWorkers,
c.workerStatusUpdateTimes,
c.kms,
c.livenessTimeToStale,
c.ControllerExtension,
)
pbs.RegisterSessionServiceServer(server, workerService)
return nil
}