Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .protoc-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
27.3
31.1
48 changes: 33 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ doctest = false
[dependencies]
enum-map = "2.7"
prost = "0.13"
tonic = { version = "0.12", default-features = false, features = [
tonic = { version = "0.13", default-features = false, features = [
"prost",
"codegen",
] }
Expand All @@ -31,18 +31,17 @@ serde = { version = "1.0", optional = true }
[features]
pbjson = ["dep:pbjson", "dep:serde"]
descriptor = []
generate_only = []

[dev-dependencies]
anyhow = "1"
glob = "0.3"
pbjson-build = "0.7"
prost-build = "0.13"
prost-types = "0.13"
rand = "0.8"
rand = "0.9"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
toml = "0.8"
tonic-build = { version = "0.12", default-features = false, features = [
"prost",
] }
tonic-build = { version = "0.13", default-features = false, features = ["prost"] }
xshell = "0.2"
10 changes: 5 additions & 5 deletions protobufs.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
# the other dependencies in this file. The git refs here MUST match the versions
# listed in enovyproxy/data-plane-api.git/bazel/repository_locations.bzl.
[dependencies]
envoy-data-plane = { repo_url = "https://github.com/envoyproxy/data-plane-api.git", git_ref = "786c93ccaae9891338f098a5aba60e9987d78bd3" }
cncf-xds = { repo_url = "https://github.com/cncf/xds", git_ref = "555b57ec207be86f811fb0c04752db6f85e3d7e2" }
envoy-data-plane = { repo_url = "https://github.com/envoyproxy/data-plane-api.git", git_ref = "09409f495015a2a144d421300458d3ad49e20031" }
cncf-xds = { repo_url = "https://github.com/cncf/xds", git_ref = "2ac532fd44436293585084f8d94c6bdb17835af0" }
protoc-gen-validate = { repo_url = "https://github.com/bufbuild/protoc-gen-validate", git_ref = "v1.0.4" }
googleapis = { repo_url = "https://github.com/googleapis/googleapis", git_ref = "114a745b2841a044e98cdbb19358ed29fcf4a5f1" }
opencensus-proto = { repo_url = "https://github.com/census-instrumentation/opencensus-proto", git_ref = "v0.4.1", proto_root = "src" }
prometheus-client-model = { repo_url = "https://github.com/prometheus/client_model", git_ref = "v0.6.1" }
googleapis = { repo_url = "https://github.com/googleapis/googleapis", git_ref = "fd52b5754b2b268bc3a22a10f29844f206abb327" }
opentelemetry-proto = { repo_url = "https://github.com/open-telemetry/opentelemetry-proto", git_ref = "v1.7.0", proto_root = "src" }
prometheus-client-model = { repo_url = "https://github.com/prometheus/client_model", git_ref = "v0.6.2" }
10 changes: 10 additions & 0 deletions src/generated/envoy.admin.v3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,12 @@ pub enum ClientResourceStatus {
Acked = 3,
/// Client received this resource and replied with NACK.
Nacked = 4,
/// Client received an error from the control plane. The attached config
/// dump is the most recent accepted one. If no config is accepted yet,
/// the attached config dump will be empty.
ReceivedError = 5,
/// Client timed out waiting for the resource from the control plane.
Timeout = 6,
}
impl ClientResourceStatus {
/// String value of the enum field names used in the ProtoBuf definition.
Expand All @@ -660,6 +666,8 @@ impl ClientResourceStatus {
Self::DoesNotExist => "DOES_NOT_EXIST",
Self::Acked => "ACKED",
Self::Nacked => "NACKED",
Self::ReceivedError => "RECEIVED_ERROR",
Self::Timeout => "TIMEOUT",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
Expand All @@ -670,6 +678,8 @@ impl ClientResourceStatus {
"DOES_NOT_EXIST" => Some(Self::DoesNotExist),
"ACKED" => Some(Self::Acked),
"NACKED" => Some(Self::Nacked),
"RECEIVED_ERROR" => Some(Self::ReceivedError),
"TIMEOUT" => Some(Self::Timeout),
_ => None,
}
}
Expand Down
6 changes: 6 additions & 0 deletions src/generated/envoy.admin.v3.serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ impl serde::Serialize for ClientResourceStatus {
Self::DoesNotExist => "DOES_NOT_EXIST",
Self::Acked => "ACKED",
Self::Nacked => "NACKED",
Self::ReceivedError => "RECEIVED_ERROR",
Self::Timeout => "TIMEOUT",
};
serializer.serialize_str(variant)
}
Expand All @@ -26,6 +28,8 @@ impl<'de> serde::Deserialize<'de> for ClientResourceStatus {
"DOES_NOT_EXIST",
"ACKED",
"NACKED",
"RECEIVED_ERROR",
"TIMEOUT",
];

struct GeneratedVisitor;
Expand Down Expand Up @@ -71,6 +75,8 @@ impl<'de> serde::Deserialize<'de> for ClientResourceStatus {
"DOES_NOT_EXIST" => Ok(ClientResourceStatus::DoesNotExist),
"ACKED" => Ok(ClientResourceStatus::Acked),
"NACKED" => Ok(ClientResourceStatus::Nacked),
"RECEIVED_ERROR" => Ok(ClientResourceStatus::ReceivedError),
"TIMEOUT" => Ok(ClientResourceStatus::Timeout),
_ => Err(serde::de::Error::unknown_variant(value, FIELDS)),
}
}
Expand Down
45 changes: 24 additions & 21 deletions src/generated/envoy.config.accesslog.v3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,35 +227,38 @@ impl ::prost::Name for TraceableFilter {
"type.googleapis.com/envoy.config.accesslog.v3.TraceableFilter".into()
}
}
/// Filters for random sampling of requests.
/// Filters requests based on runtime-configurable sampling rates.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RuntimeFilter {
/// Runtime key to get an optional overridden numerator for use in the
/// ``percent_sampled`` field. If found in runtime, this value will replace the
/// default numerator.
/// Specifies a key used to look up a custom sampling rate from the runtime configuration. If a value is found for this
/// key, it will override the default sampling rate specified in ``percent_sampled``.
#[prost(string, tag = "1")]
pub runtime_key: ::prost::alloc::string::String,
/// The default sampling percentage. If not specified, defaults to 0% with
/// denominator of 100.
/// Defines the default sampling percentage when no runtime override is present. If not specified, the default is
/// **0%** (with a denominator of 100).
#[prost(message, optional, tag = "2")]
pub percent_sampled: ::core::option::Option<
super::super::super::r#type::v3::FractionalPercent,
>,
/// By default, sampling pivots on the header
/// :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` being
/// present. If :ref:`x-request-id<config_http_conn_man_headers_x-request-id>`
/// is present, the filter will consistently sample across multiple hosts based
/// on the runtime key value and the value extracted from
/// :ref:`x-request-id<config_http_conn_man_headers_x-request-id>`. If it is
/// missing, or ``use_independent_randomness`` is set to true, the filter will
/// randomly sample based on the runtime key value alone.
/// ``use_independent_randomness`` can be used for logging kill switches within
/// complex nested :ref:`AndFilter
/// <envoy_v3_api_msg_config.accesslog.v3.AndFilter>` and :ref:`OrFilter
/// <envoy_v3_api_msg_config.accesslog.v3.OrFilter>` blocks that are easier to
/// reason about from a probability perspective (i.e., setting to true will
/// cause the filter to behave like an independent random variable when
/// composed within logical operator filters).
/// Controls how sampling decisions are made.
///
/// - Default behavior (``false``):
///
/// * Uses the :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` as a consistent sampling pivot.
/// * When :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` is present, sampling will be consistent
/// across multiple hosts based on both the ``runtime_key`` and
/// :ref:`x-request-id<config_http_conn_man_headers_x-request-id>`.
/// * Useful for tracking related requests across a distributed system.
///
/// - When set to ``true`` or :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` is missing:
///
/// * Sampling decisions are made randomly based only on the ``runtime_key``.
/// * Useful in complex filter configurations (like nested
/// :ref:`AndFilter<envoy_v3_api_msg_config.accesslog.v3.AndFilter>`/
/// :ref:`OrFilter<envoy_v3_api_msg_config.accesslog.v3.OrFilter>` blocks) where independent probability
/// calculations are desired.
/// * Can be used to implement logging kill switches with predictable probability distributions.
///
#[prost(bool, tag = "3")]
pub use_independent_randomness: bool,
}
Expand Down
4 changes: 1 addition & 3 deletions src/generated/envoy.config.bootstrap.v3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,7 @@ pub mod bootstrap {
/// If a network based configuration source is specified for :ref:`cds_config
/// <envoy_v3_api_field_config.bootstrap.v3.Bootstrap.DynamicResources.cds_config>`, it's necessary
/// to have some initial cluster definitions available to allow Envoy to know
/// how to speak to the management server. These cluster definitions may not
/// use :ref:`EDS <arch_overview_dynamic_config_eds>` (i.e. they should be static
/// IP or DNS-based).
/// how to speak to the management server.
#[prost(message, repeated, tag = "2")]
pub clusters: ::prost::alloc::vec::Vec<
super::super::super::cluster::v3::Cluster,
Expand Down
Loading