-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PIDP-775 HealthCheck endpoints for PlrIntake (#421)
* Liveness and readiness endpoint * nl --------- Co-authored-by: James Hollinger <39168456+james-hollinger@users.noreply.github.com>
- Loading branch information
1 parent
0a275d0
commit 96bef2b
Showing
3 changed files
with
38 additions
and
2 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
backend/services.plr-intake/Infrastructure/HealthChecks/HealthCheckTag.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
|
||
namespace PlrIntake.Infrastructure.HealthChecks; | ||
|
||
public class HealthCheckTag | ||
{ | ||
/// <summary> | ||
/// Represents a "liveness" check. | ||
/// A service that fails a liveness check is considered to be unrecoverable and has to be restarted by the orchestrator. | ||
/// </summary> | ||
public static readonly HealthCheckTag Liveness = new("liveness"); | ||
|
||
/// <summary> | ||
/// Represents a "readiness" check. | ||
/// A service that fails a readiness check is considered to be unable to serve traffic temporarily. | ||
/// </summary> | ||
public static readonly HealthCheckTag Readiness = new("readiness"); | ||
|
||
public string Value { get; } | ||
|
||
private HealthCheckTag(string value) => this.Value = value; | ||
|
||
public static implicit operator string(HealthCheckTag type) => type.Value; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters