예제 #1
0
        public OrchestratorService(IDistributionConfiguration config, LoggingContext loggingContext, DistributedBuildId buildId) : base(buildId)
        {
            Contract.Requires(config != null && config.BuildRole.IsOrchestrator());
            Contract.Ensures(m_remoteWorkers != null);

            // Create all remote workers
            m_buildServicePort = config.BuildServicePort;
            m_remoteWorkers    = new RemoteWorker[config.BuildWorkers.Count];

            m_loggingContext = loggingContext;

            for (int i = 0; i < m_remoteWorkers.Length; i++)
            {
                var configWorker    = config.BuildWorkers[i];
                var workerId        = i + 1; // 0 represents the local worker.
                var serviceLocation = new ServiceLocation {
                    IpAddress = configWorker.IpAddress, Port = configWorker.BuildServicePort
                };
                m_remoteWorkers[i] = new RemoteWorker(loggingContext, (uint)workerId, this, serviceLocation);
            }

            m_orchestratorServer = new Grpc.GrpcOrchestratorServer(loggingContext, this, buildId);
        }
예제 #2
0
 public ServerInterceptor(LoggingContext loggingContext, DistributedBuildId buildId)
 {
     m_loggingContext = loggingContext;
     m_buildId        = buildId;
 }
예제 #3
0
 /// <nodoc/>
 public DistributionService(DistributedBuildId buildId)
 {
     BuildId = buildId;
 }