update
This commit is contained in:
@@ -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>
|
||||
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user