This commit is contained in:
masoodafar-web
2025-12-02 03:32:26 +03:30
parent 6cd29e8b26
commit c9dab944fa
56 changed files with 1181 additions and 710 deletions

View File

@@ -0,0 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>true</IsPackable>
<PackageId>BackOffice.BFF.Health.Protobuf</PackageId>
<Version>1.0.0</Version>
<Authors>FourSat</Authors>
<Company>FourSat</Company>
<Product>BackOffice.BFF.Health.Protobuf</Product>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Google.Protobuf" Version="3.23.3" />
<PackageReference Include="Grpc.Core.Api" Version="2.54.0" />
<PackageReference Include="Grpc.Tools" Version="2.72.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Protobuf Include="Protos\health.proto" GrpcServices="Both" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,33 @@
syntax = "proto3";
package health;
import "google/protobuf/timestamp.proto";
option csharp_namespace = "BackOffice.BFF.Health.Protobuf";
service HealthContract
{
rpc GetSystemHealth(GetSystemHealthRequest) returns (GetSystemHealthResponse);
}
message GetSystemHealthRequest
{
// Empty - returns all services health status
}
message GetSystemHealthResponse
{
bool overall_healthy = 1;
repeated ServiceHealthModel services = 2;
google.protobuf.Timestamp checked_at = 3;
}
message ServiceHealthModel
{
string service_name = 1;
string status = 2; // "Healthy", "Degraded", "Unhealthy"
string description = 3;
int64 response_time_ms = 4;
google.protobuf.Timestamp last_check = 5;
}