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
|
// @generated
// This file is @generated by prost-build.
// \[#protodoc-title: Dlb connection balancer configuration\]
// DLB :ref:`configuration overview <config_connection_balance_dlb>`.
// \[#extension: envoy.network.connection_balance.dlb\]
/// The Dlb is a hardware managed system of queues and arbiters connecting producers and consumers. It is a PCIE device
/// in the CPU package. It interacts with software running on cores and potentially other devices. The Dlb implements the
/// following balancing features:
///
/// - Lock-free multi-producer/multi-consumer operation.
/// - Multiple priorities for varying traffic types.
/// - Various distribution schemes.
///
/// Dlb connection balancer uses Dlb hardware to balance connections, and can significantly reduce latency.
///
/// As the Dlb connection balancer provides assistance from dedicated Dlb hardware, it can be used for a proxy with a large number of connections
/// (e.g., a gateway).
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Dlb {
/// The ID of the Dlb hardware, start from 0.
/// If not specified, use the first available device as default.
#[prost(uint32, tag="1")]
pub id: u32,
/// Maximum number of retries when sending to DLB device fails.
/// No retry as default.
#[prost(uint32, tag="2")]
pub max_retries: u32,
#[prost(enumeration="dlb::FallbackPolicy", tag="3")]
pub fallback_policy: i32,
}
/// Nested message and enum types in `Dlb`.
pub mod dlb {
/// The fallback policy if any error occurs.
/// The default policy is None.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum FallbackPolicy {
/// No fallback policy.
None = 0,
/// Fall back to Nop Connection Balance.
NopConnectionBalance = 1,
/// Fall back to Exact Connection Balance.
ExactConnectionBalance = 2,
}
impl FallbackPolicy {
/// 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 {
FallbackPolicy::None => "None",
FallbackPolicy::NopConnectionBalance => "NopConnectionBalance",
FallbackPolicy::ExactConnectionBalance => "ExactConnectionBalance",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"None" => Some(Self::None),
"NopConnectionBalance" => Some(Self::NopConnectionBalance),
"ExactConnectionBalance" => Some(Self::ExactConnectionBalance),
_ => None,
}
}
}
}
// @@protoc_insertion_point(module)
|