Xabaril / AspNetCore.Diagnostics.HealthChecks

Enterprise HealthChecks for ASP.NET Core Diagnostics Package
Apache License 2.0
3.98k stars 771 forks source link

Support Uri setting for AspNetCore.HealthChecks.Consul #2165

Open Cheshirre opened 4 months ago

Cheshirre commented 4 months ago

What would you like to be added:

    public class ConsulOptions
    {
        //replace this
        public string HostName { get; set; } = null!;

        public int Port { get; set; }
       //to this
        public Uri Address { get; set; }

        public bool RequireHttps { get; set; }

        public bool RequireBasicAuthentication { get; set; }

        public string? Username { get; set; }

        public string? Password { get; set; }
    }

or add ass alternative configuration option

Why is this needed: To provide config like this: cco.Address = new Uri(configuration["Consul:Host"]); Now it's not useful

sungam3r commented 4 months ago

It will be a breaking change.