summaryrefslogtreecommitdiff
path: root/src/rpc/envoy.service.discovery.v2.rs
blob: ca771c3669f11457f6db0144e1ef034ee5029b94 (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
140
141
142
143
144
145
// @generated
// This file is @generated by prost-build.
/// \[#not-implemented-hide:\] Not configuration. Workaround c++ protobuf issue with importing
/// services: <https://github.com/google/protobuf/issues/4221>
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct AdsDummy {
}
/// Defines supported protocols etc, so the management server can assign proper
/// endpoints to healthcheck.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Capability {
    #[prost(enumeration="capability::Protocol", repeated, tag="1")]
    pub health_check_protocols: ::prost::alloc::vec::Vec<i32>,
}
/// Nested message and enum types in `Capability`.
pub mod capability {
    /// Different Envoy instances may have different capabilities (e.g. Redis)
    /// and/or have ports enabled for different protocols.
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum Protocol {
        Http = 0,
        Tcp = 1,
        Redis = 2,
    }
    impl Protocol {
        /// 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 {
                Protocol::Http => "HTTP",
                Protocol::Tcp => "TCP",
                Protocol::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),
                "REDIS" => Some(Self::Redis),
                _ => None,
            }
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HealthCheckRequest {
    #[prost(message, optional, tag="1")]
    pub node: ::core::option::Option<super::super::super::api::v2::core::Node>,
    #[prost(message, optional, tag="2")]
    pub capability: ::core::option::Option<Capability>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EndpointHealth {
    #[prost(message, optional, tag="1")]
    pub endpoint: ::core::option::Option<super::super::super::api::v2::endpoint::Endpoint>,
    #[prost(enumeration="super::super::super::api::v2::core::HealthStatus", tag="2")]
    pub health_status: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EndpointHealthResponse {
    #[prost(message, repeated, tag="1")]
    pub endpoints_health: ::prost::alloc::vec::Vec<EndpointHealth>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HealthCheckRequestOrEndpointHealthResponse {
    #[prost(oneof="health_check_request_or_endpoint_health_response::RequestType", tags="1, 2")]
    pub request_type: ::core::option::Option<health_check_request_or_endpoint_health_response::RequestType>,
}
/// Nested message and enum types in `HealthCheckRequestOrEndpointHealthResponse`.
pub mod health_check_request_or_endpoint_health_response {
    #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum RequestType {
        #[prost(message, tag="1")]
        HealthCheckRequest(super::HealthCheckRequest),
        #[prost(message, tag="2")]
        EndpointHealthResponse(super::EndpointHealthResponse),
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LocalityEndpoints {
    #[prost(message, optional, tag="1")]
    pub locality: ::core::option::Option<super::super::super::api::v2::core::Locality>,
    #[prost(message, repeated, tag="2")]
    pub endpoints: ::prost::alloc::vec::Vec<super::super::super::api::v2::endpoint::Endpoint>,
}
/// The cluster name and locality is provided to Envoy for the endpoints that it
/// health checks to support statistics reporting, logging and debugging by the
/// Envoy instance (outside of HDS). For maximum usefulness, it should match the
/// same cluster structure as that provided by EDS.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClusterHealthCheck {
    #[prost(string, tag="1")]
    pub cluster_name: ::prost::alloc::string::String,
    #[prost(message, repeated, tag="2")]
    pub health_checks: ::prost::alloc::vec::Vec<super::super::super::api::v2::core::HealthCheck>,
    #[prost(message, repeated, tag="3")]
    pub locality_endpoints: ::prost::alloc::vec::Vec<LocalityEndpoints>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HealthCheckSpecifier {
    #[prost(message, repeated, tag="1")]
    pub cluster_health_checks: ::prost::alloc::vec::Vec<ClusterHealthCheck>,
    /// The default is 1 second.
    #[prost(message, optional, tag="2")]
    pub interval: ::core::option::Option<super::super::super::super::google::protobuf::Duration>,
}
/// \[#not-implemented-hide:\] Not configuration. Workaround c++ protobuf issue with importing
/// services: <https://github.com/google/protobuf/issues/4221>
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RtdsDummy {
}
/// RTDS resource type. This describes a layer in the runtime virtual filesystem.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Runtime {
    /// Runtime resource name. This makes the Runtime a self-describing xDS
    /// resource.
    #[prost(string, tag="1")]
    pub name: ::prost::alloc::string::String,
    #[prost(message, optional, tag="2")]
    pub layer: ::core::option::Option<super::super::super::super::google::protobuf::Struct>,
}
/// \[#not-implemented-hide:\] Not configuration. Workaround c++ protobuf issue with importing
/// services: <https://github.com/google/protobuf/issues/4221>
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SdsDummy {
}
include!("envoy.service.discovery.v2.tonic.rs");
// @@protoc_insertion_point(module)