forked from topnguyen/Elect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ElectHealthCheckOptions.cs
33 lines (28 loc) · 1.1 KB
/
ElectHealthCheckOptions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using System;
using Elect.Core.Interfaces;
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
using Microsoft.Extensions.DependencyInjection;
namespace Elect.Web.HealthCheck.Models
{
public class ElectHealthCheckOptions : IElectOptions
{
public bool IsEnable { get; set; } = true;
/// <summary>
/// Endpoint to access healthy report, default is "/health"
/// </summary>
public string Endpoint { get; set; } = "/health";
/// <summary>
/// Config Database Connection String for Health Check
/// </summary>
/// <remarks>Leave this null for disable Database Check</remarks>
public string DbConnectionString { get; set; }
/// <summary>
/// Do more action after finish config Health Check Builder
/// </summary>
public Action<IHealthChecksBuilder> Builder { get; set; }
/// <summary>
/// Adjust <see cref="Options"/> before this service use it
/// </summary>
public Func<HealthCheckOptions, HealthCheckOptions> Options { get; set; }
}
}