summaryrefslogtreecommitdiff
path: root/src/rpc/envoy.data.core.v2alpha.rs
blob: 93a3d0cb98aaa81c9345acdb514e2af17e5ee1dc (plain)
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
// @generated
// This file is @generated by prost-build.
/// \[#next-free-field: 10\]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HealthCheckEvent {
    #[prost(enumeration="HealthCheckerType", tag="1")]
    pub health_checker_type: i32,
    #[prost(message, optional, tag="2")]
    pub host: ::core::option::Option<super::super::super::api::v2::core::Address>,
    #[prost(string, tag="3")]
    pub cluster_name: ::prost::alloc::string::String,
    /// Timestamp for event.
    #[prost(message, optional, tag="6")]
    pub timestamp: ::core::option::Option<super::super::super::super::google::protobuf::Timestamp>,
    #[prost(oneof="health_check_event::Event", tags="4, 5, 7, 8, 9")]
    pub event: ::core::option::Option<health_check_event::Event>,
}
/// Nested message and enum types in `HealthCheckEvent`.
pub mod health_check_event {
    #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
    pub enum Event {
        /// Host ejection.
        #[prost(message, tag="4")]
        EjectUnhealthyEvent(super::HealthCheckEjectUnhealthy),
        /// Host addition.
        #[prost(message, tag="5")]
        AddHealthyEvent(super::HealthCheckAddHealthy),
        /// Host failure.
        #[prost(message, tag="7")]
        HealthCheckFailureEvent(super::HealthCheckFailure),
        /// Healthy host became degraded.
        #[prost(message, tag="8")]
        DegradedHealthyHost(super::DegradedHealthyHost),
        /// A degraded host returned to being healthy.
        #[prost(message, tag="9")]
        NoLongerDegradedHost(super::NoLongerDegradedHost),
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct HealthCheckEjectUnhealthy {
    /// The type of failure that caused this ejection.
    #[prost(enumeration="HealthCheckFailureType", tag="1")]
    pub failure_type: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct HealthCheckAddHealthy {
    /// Whether this addition is the result of the first ever health check on a host, in which case
    /// the configured :ref:`healthy threshold <envoy_api_field_core.HealthCheck.healthy_threshold>`
    /// is bypassed and the host is immediately added.
    #[prost(bool, tag="1")]
    pub first_check: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct HealthCheckFailure {
    /// The type of failure that caused this event.
    #[prost(enumeration="HealthCheckFailureType", tag="1")]
    pub failure_type: i32,
    /// Whether this event is the result of the first ever health check on a host.
    #[prost(bool, tag="2")]
    pub first_check: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DegradedHealthyHost {
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct NoLongerDegradedHost {
}
// \[#protodoc-title: Health check logging events\]
// :ref:`Health check logging <arch_overview_health_check_logging>`.

#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum HealthCheckFailureType {
    Active = 0,
    Passive = 1,
    Network = 2,
}
impl HealthCheckFailureType {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            HealthCheckFailureType::Active => "ACTIVE",
            HealthCheckFailureType::Passive => "PASSIVE",
            HealthCheckFailureType::Network => "NETWORK",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "ACTIVE" => Some(Self::Active),
            "PASSIVE" => Some(Self::Passive),
            "NETWORK" => Some(Self::Network),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum HealthCheckerType {
    Http = 0,
    Tcp = 1,
    Grpc = 2,
    Redis = 3,
}
impl HealthCheckerType {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            HealthCheckerType::Http => "HTTP",
            HealthCheckerType::Tcp => "TCP",
            HealthCheckerType::Grpc => "GRPC",
            HealthCheckerType::Redis => "REDIS",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "HTTP" => Some(Self::Http),
            "TCP" => Some(Self::Tcp),
            "GRPC" => Some(Self::Grpc),
            "REDIS" => Some(Self::Redis),
            _ => None,
        }
    }
}
// @@protoc_insertion_point(module)