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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// Copyright (c) 2022 Espresso Systems (espressosys.com)
// This file is part of the tide-disco library.
// You should have received a copy of the MIT License
// along with the tide-disco library. If not, see <https://mit-license.org/>.
use crateStatusCode;
use ;
/// A response to a healthcheck endpoint.
///
/// A type implementing [HealthCheck] may be returned from a healthcheck endpoint itself (via its
/// [Serialize] implementation) as well as incorporated automatically into the global healthcheck
/// endpoint for an app. The global healthcheck will fail if any of the module healthchecks return
/// an implementation `h` of [HealthCheck] where `h.status() != StatusCode::OK`.
///
/// We provide a standard implementation [HealthStatus] which has variants for common states an
/// application might encounter. We recommend using this implementation as a standard, although it
/// is possible to implement the [HealthCheck] trait yourself if you desire more information in
/// your healthcheck response.
/// Common health statuses of an application.