pub struct PathConfigSource {
pub path: String,
pub watched_directory: Option<WatchedDirectory>,
}
Expand description
Local filesystem path configuration source.
Fields§
§path: String
Path on the filesystem to source and watch for configuration updates.
When sourcing configuration for a :ref:secret <envoy_v3_api_msg_extensions.transport_sockets.tls.v3.Secret>
,
the certificate and key files are also watched for updates.
.. note::
The path to the source must exist at config load time.
.. note::
If watched_directory
is not configured, Envoy will watch the file path for moves.
This is because in general only moves are atomic. The same method of swapping files as is
demonstrated in the :ref:runtime documentation <config_runtime_symbolic_link_swap>
can be
used here also. If watched_directory
is configured, no watch will be placed directly on
this path. Instead, the configured watched_directory
will be used to trigger reloads of
this path. This is required in certain deployment scenarios. See below for more information.
watched_directory: Option<WatchedDirectory>
If configured, this directory will be watched for moves. When an entry in this directory is
moved to, the path
will be reloaded. This is required in certain deployment scenarios.
Specifically, if trying to load an xDS resource using a
Kubernetes ConfigMap <<https://kubernetes.io/docs/concepts/configuration/configmap/>
_,> the
following configuration might be used:
- Store xds.yaml inside a ConfigMap.
- Mount the ConfigMap to
/config_map/xds
- Configure path
/config_map/xds/xds.yaml
- Configure watched directory
/config_map/xds
The above configuration will ensure that Envoy watches the owning directory for moves which is required due to how Kubernetes manages ConfigMap symbolic links during atomic updates.
Trait Implementations§
Source§impl Clone for PathConfigSource
impl Clone for PathConfigSource
Source§fn clone(&self) -> PathConfigSource
fn clone(&self) -> PathConfigSource
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for PathConfigSource
impl Debug for PathConfigSource
Source§impl Default for PathConfigSource
impl Default for PathConfigSource
Source§impl Message for PathConfigSource
impl Message for PathConfigSource
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.Source§impl Name for PathConfigSource
impl Name for PathConfigSource
Source§const NAME: &'static str = "PathConfigSource"
const NAME: &'static str = "PathConfigSource"
Message
.
This name is the same as it appears in the source .proto file, e.g. FooBar
.Source§const PACKAGE: &'static str = "envoy.config.core.v3"
const PACKAGE: &'static str = "envoy.config.core.v3"
.
, e.g. google.protobuf
.Source§fn full_name() -> String
fn full_name() -> String
Message
.
It’s prefixed with the package name and names of any parent messages,
e.g. google.rpc.BadRequest.FieldViolation
.
By default, this is the package name followed by the message name.
Fully-qualified names must be unique within a domain of Type URLs.Source§impl PartialEq for PathConfigSource
impl PartialEq for PathConfigSource
impl StructuralPartialEq for PathConfigSource
Auto Trait Implementations§
impl Freeze for PathConfigSource
impl RefUnwindSafe for PathConfigSource
impl Send for PathConfigSource
impl Sync for PathConfigSource
impl Unpin for PathConfigSource
impl UnwindSafe for PathConfigSource
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request