pub struct UpstreamConfig { /* private fields */ }Implementations§
Source§impl UpstreamConfig
impl UpstreamConfig
Sourcepub fn new(
target: String,
is_in_process: bool,
tls: bool,
cert_path: Option<&str>,
) -> Result<Self, FlagdError>
pub fn new( target: String, is_in_process: bool, tls: bool, cert_path: Option<&str>, ) -> Result<Self, FlagdError>
Creates a new upstream configuration for connecting to flagd.
§Arguments
target- The target address (host:port, URL, or envoy:// URI)is_in_process- Whether this is for in-process resolver (affects default port)tls- Whether to use TLS for the connectioncert_path- Optional path to a PEM-encoded CA certificate for custom/self-signed certs
§TLS Behavior
- If
cert_pathis provided, the certificate is loaded and used as the trusted CA - If
cert_pathis None and TLS is enabled, system/webpki roots are used - Self-signed certificates require providing the CA cert via
cert_path
pub fn endpoint(&self) -> &Endpoint
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for UpstreamConfig
impl !RefUnwindSafe for UpstreamConfig
impl !UnwindSafe for UpstreamConfig
impl Send for UpstreamConfig
impl Sync for UpstreamConfig
impl Unpin for UpstreamConfig
impl UnsafeUnpin for UpstreamConfig
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> 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