Struct mz_storage_client::types::connections::ConnectionContext
source · pub struct ConnectionContext {
pub librdkafka_log_level: Level,
pub aws_external_id_prefix: Option<AwsExternalIdPrefix>,
pub secrets_reader: Arc<dyn SecretsReader>,
pub cloud_resource_reader: Option<Arc<dyn CloudResourceReader>>,
pub ssh_tunnel_manager: SshTunnelManager,
}
Expand description
Extra context to pass through when instantiating a connection for a source or sink.
Should be kept cheaply cloneable.
Fields§
§librdkafka_log_level: Level
The level for librdkafka’s logs.
aws_external_id_prefix: Option<AwsExternalIdPrefix>
A prefix for an external ID to use for all AWS AssumeRole operations.
secrets_reader: Arc<dyn SecretsReader>
A secrets reader.
cloud_resource_reader: Option<Arc<dyn CloudResourceReader>>
A cloud resource reader, if supported in this configuration.
ssh_tunnel_manager: SshTunnelManager
A manager for SSH tunnels.
Implementations§
source§impl ConnectionContext
impl ConnectionContext
sourcepub fn from_cli_args(
startup_log_level: &CloneableEnvFilter,
aws_external_id_prefix: Option<AwsExternalIdPrefix>,
secrets_reader: Arc<dyn SecretsReader>,
cloud_resource_reader: Option<Arc<dyn CloudResourceReader>>
) -> ConnectionContext
pub fn from_cli_args( startup_log_level: &CloneableEnvFilter, aws_external_id_prefix: Option<AwsExternalIdPrefix>, secrets_reader: Arc<dyn SecretsReader>, cloud_resource_reader: Option<Arc<dyn CloudResourceReader>> ) -> ConnectionContext
Constructs a new connection context from command line arguments.
WARNING: it is critical for security that the aws_external_id
be
provided by the operator of the Materialize service (i.e., via a CLI
argument or environment variable) and not the end user of Materialize
(e.g., via a configuration option in a SQL statement). See
AwsExternalIdPrefix
for details.
sourcepub fn for_tests(secrets_reader: Arc<dyn SecretsReader>) -> ConnectionContext
pub fn for_tests(secrets_reader: Arc<dyn SecretsReader>) -> ConnectionContext
Constructs a new connection context for usage in tests.
Trait Implementations§
source§impl Clone for ConnectionContext
impl Clone for ConnectionContext
source§fn clone(&self) -> ConnectionContext
fn clone(&self) -> ConnectionContext
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for ConnectionContext
impl Send for ConnectionContext
impl Sync for ConnectionContext
impl Unpin for ConnectionContext
impl !UnwindSafe for ConnectionContext
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
Mutably borrows from an owned value. Read more
source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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>
Wrap the input message
T
in a tonic::Request
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
impl<P, R> ProtoType<R> for Pwhere R: RustType<P>,
source§fn into_rust(self) -> Result<R, TryFromProtoError>
fn into_rust(self) -> Result<R, TryFromProtoError>
See
RustType::from_proto
.source§fn from_rust(rust: &R) -> P
fn from_rust(rust: &R) -> P
See
RustType::into_proto
.