示例#1
0
        /// <summary>
        /// Add a service health check based on a HTTP or TCP endpoint
        /// </summary>
        /// <param name="checks">more or more consul health checks</param>
        public void AddServiceCheck(params ConsulRegisterCheck[] checks)
        {
            var validator = new ConsulRegisterCheckValidator();

            foreach (var check in checks)
            {
                validator.ValidateAndThrow(check);
            }

            this.serviceChecks.AddRange(checks);
        }