pub struct X509SourceBuilder { /* private fields */ }Expand description
Builder for X509Source.
Use this when you need explicit configuration (socket path, picker, backoff).
Implementations§
Source§impl X509SourceBuilder
impl X509SourceBuilder
Sourcepub fn with_socket_path(self, socket_path: impl Into<Arc<str>>) -> Self
pub fn with_socket_path(self, socket_path: impl Into<Arc<str>>) -> Self
Sets the Workload API socket path.
Accepts either a filesystem path (e.g. /tmp/spire-agent/public/api.sock)
or a full URI (e.g. unix:///tmp/spire-agent/public/api.sock).
Sourcepub fn with_client_factory(
self,
factory: Arc<dyn Fn() -> Pin<Box<dyn Future<Output = Result<WorkloadApiClient, GrpcClientError>> + Send + 'static>> + Send + Sync + 'static>,
) -> Self
pub fn with_client_factory( self, factory: Arc<dyn Fn() -> Pin<Box<dyn Future<Output = Result<WorkloadApiClient, GrpcClientError>> + Send + 'static>> + Send + Sync + 'static>, ) -> Self
Sets a custom client factory.
Sourcepub fn with_picker(self, svid_picker: Box<dyn SvidPicker>) -> Self
pub fn with_picker(self, svid_picker: Box<dyn SvidPicker>) -> Self
Sets a custom SVID selection strategy.
Sourcepub fn with_reconnect_backoff(
self,
min_backoff: Duration,
max_backoff: Duration,
) -> Self
pub fn with_reconnect_backoff( self, min_backoff: Duration, max_backoff: Duration, ) -> Self
Sets the reconnect backoff range.
Sourcepub async fn build(self) -> Result<Arc<X509Source>, X509SourceError>
pub async fn build(self) -> Result<Arc<X509Source>, X509SourceError>
Builds a ready-to-use X509Source.
Trait Implementations§
Source§impl Debug for X509SourceBuilder
impl Debug for X509SourceBuilder
Auto Trait Implementations§
impl Freeze for X509SourceBuilder
impl !RefUnwindSafe for X509SourceBuilder
impl Send for X509SourceBuilder
impl Sync for X509SourceBuilder
impl Unpin for X509SourceBuilder
impl !UnwindSafe for X509SourceBuilder
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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