public HealthCheckMiddleware( OwinMiddleware next, ILogger logger, HealthCheckOptions healthCheckOptions, HealthCheckWrapper[] healthChecks) : base(next) { if (next == null) { throw new ArgumentNullException(nameof(next)); } if (healthCheckOptions == null) { throw new ArgumentNullException(nameof(healthCheckOptions)); } if (healthChecks == null) { throw new ArgumentNullException(nameof(healthChecks)); } _next = next; _healthCheckOptions = healthCheckOptions; _healthCheckService = new RimDevAspNetHealthCheckService(logger); _healthChecks = healthChecks; }
public static void UseHealthChecks( this IAppBuilder app, string url, HealthCheckOptions options, IEnumerable <IHealthCheck> healthChecks) { UseHealthChecks(app, url, options, healthChecks.ToArray()); }
public static void UseHealthChecks( this IAppBuilder app, string url, HealthCheckOptions options, params HealthCheckWrapper[] healthChecks) { UseHealthChecks(app, url, null, options, healthChecks); }
public HealthCheckMiddleware( OwinMiddleware next, ILogger logger, HealthCheckOptions healthCheckOptions, IHealthCheck[] healthChecks) : this(next, logger, healthCheckOptions, healthChecks.Select(healthCheck => new HealthCheckWrapper(healthCheck)).ToArray()) { }
public static void UseHealthChecks( this IAppBuilder app, string url, HealthCheckOptions options, params IHealthCheck[] healthChecks) { var loggerFactory = new Microsoft.Extensions.Logging.LoggerFactory(); var logger = loggerFactory.CreateLogger(nameof(HealthCheckMiddleware)); app.Map(url, appBuilder => { appBuilder.Use <HealthCheckMiddleware>( logger, options, healthChecks); }); }
public static void UseHealthChecks( this IAppBuilder app, string url, ILogger logger, HealthCheckOptions options, params IHealthCheck[] healthChecks) { if (logger == null) { var loggerFactory = new LoggerFactory(); logger = loggerFactory.CreateLogger(nameof(HealthCheckMiddleware)); } app.Map(url, appBuilder => { appBuilder.Use <HealthCheckMiddleware>( logger, options, healthChecks); }); }