public static void UseWebApiHealthCheck(this IApplicationBuilder app, Action <HealthCheckOptions> optionsSetup) { var customOptions = new HealthCheckOptions(); optionsSetup(customOptions); EnsureHealthCheckOptionsCorrect(customOptions); var healthCheckOptions = new Microsoft.AspNetCore.Diagnostics.HealthChecks.HealthCheckOptions { Predicate = _ => true, ResponseWriter = HealthCheckResponseWriter.WriteHealthCheckResponse, }; app.UseHealthChecks(customOptions.HealthCheckEndpoint, healthCheckOptions); app.UseHealthChecks(customOptions.PingEndpoint, new Microsoft.AspNetCore.Diagnostics.HealthChecks.HealthCheckOptions { Predicate = _ => false }); }
public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapHealthChecks(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder routes, string pattern, Microsoft.AspNetCore.Diagnostics.HealthChecks.HealthCheckOptions options) { throw null; }
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseHealthChecks(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Http.PathString path, string port, Microsoft.AspNetCore.Diagnostics.HealthChecks.HealthCheckOptions options) { throw null; }