Project
This commit is contained in:
3
HealtRegistry/Models/HealthRequest.cs
Normal file
3
HealtRegistry/Models/HealthRequest.cs
Normal file
@@ -0,0 +1,3 @@
|
||||
namespace HealtRegistry.Models;
|
||||
|
||||
public record HealthRequest(bool? Health);
|
||||
3
HealtRegistry/Models/ServiceConfiguration.cs
Normal file
3
HealtRegistry/Models/ServiceConfiguration.cs
Normal file
@@ -0,0 +1,3 @@
|
||||
namespace HealtRegistry.Models;
|
||||
|
||||
public record ServiceConfiguration(bool DefaultValue, TimeSpan Timeout);
|
||||
7
HealtRegistry/Models/ServiceHealthData.cs
Normal file
7
HealtRegistry/Models/ServiceHealthData.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace HealtRegistry.Models;
|
||||
|
||||
public class ServiceHealthData
|
||||
{
|
||||
public required bool Healthy { get; set; }
|
||||
public required DateTimeOffset LastUpdated { get; set; }
|
||||
}
|
||||
4
HealtRegistry/Models/ServiceHealthes.cs
Normal file
4
HealtRegistry/Models/ServiceHealthes.cs
Normal file
@@ -0,0 +1,4 @@
|
||||
namespace HealtRegistry.Models;
|
||||
|
||||
public record ServiceHealth(bool Health);
|
||||
public record ServiceHealthes(IReadOnlyDictionary<string, ServiceHealth> Healthes);
|
||||
8
HealtRegistry/Models/ServicesConfiguration.cs
Normal file
8
HealtRegistry/Models/ServicesConfiguration.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace HealtRegistry.Models;
|
||||
|
||||
public class ServicesConfiguration
|
||||
{
|
||||
[Required] public required Dictionary<string, ServiceConfiguration> Services { get; init; }
|
||||
}
|
||||
Reference in New Issue
Block a user