Example #1
0
        public static Configure RunDistributor(this Configure config)
        {
            if (!config.IsConfiguredAsMasterNode())
            {
                throw new InvalidOperationException("This endpoint needs to be configured as a master node in order to run the distributor");
            }

            distributorEnabled = true;
            distributorShouldRunOnThisEndpoint = true;

            return(config);
        }
Example #2
0
        /// <summary>
        /// Enlist Worker with Master node defined in the config.
        /// </summary>
        /// <param name="config"></param>
        /// <returns></returns>
        public static Configure EnlistWithDistributor(this Configure config)
        {
            distributorEnabled = true;
            if (config.IsConfiguredAsMasterNode())
            {
                throw new InvalidOperationException("Worker endpoint should not be configured as a master node.");
            }

            ValidateMasterNodeConfigurationForWorker(config);

            return(config);
        }