pub struct RemoteGitBackendConfig {
pub base_url: String,
pub repo_id: String,
pub bearer_token: Option<String>,
pub client_cert_pem: Option<PathBuf>,
pub client_key_pem: Option<PathBuf>,
pub request_timeout: Option<Duration>,
pub max_diff_bytes: Option<u64>,
pub max_log_entries: Option<usize>,
}Expand description
Configuration for a RemoteGitBackend.
base_url should not have a trailing slash; the client constructs
{base_url}/v1/repos/{repo_id}/git/{op} per the RFC.
Fields§
§base_url: String§repo_id: String§bearer_token: Option<String>§client_cert_pem: Option<PathBuf>mTLS client certificate path (PEM). When set together with
client_key_pem, the backend reads both files at construction,
concatenates them, and configures reqwest::Identity::from_pem
on the HTTP client. Setting only one of the pair errors at
construction.
client_key_pem: Option<PathBuf>mTLS client private key path (PEM). See client_cert_pem. The key
must be in PKCS#8 PEM format for the rustls-tls backend.
request_timeout: Option<Duration>§max_diff_bytes: Option<u64>§max_log_entries: Option<usize>Implementations§
Source§impl RemoteGitBackendConfig
impl RemoteGitBackendConfig
pub fn new(base_url: impl Into<String>, repo_id: impl Into<String>) -> Self
pub fn bearer_token(self, token: impl Into<String>) -> Self
pub fn request_timeout(self, timeout: Duration) -> Self
pub fn max_diff_bytes(self, bytes: u64) -> Self
pub fn max_log_entries(self, n: usize) -> Self
pub fn client_cert_pem(self, path: impl Into<PathBuf>) -> Self
pub fn client_key_pem(self, path: impl Into<PathBuf>) -> Self
Trait Implementations§
Source§impl Clone for RemoteGitBackendConfig
impl Clone for RemoteGitBackendConfig
Source§fn clone(&self) -> RemoteGitBackendConfig
fn clone(&self) -> RemoteGitBackendConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 Freeze for RemoteGitBackendConfig
impl RefUnwindSafe for RemoteGitBackendConfig
impl Send for RemoteGitBackendConfig
impl Sync for RemoteGitBackendConfig
impl Unpin for RemoteGitBackendConfig
impl UnsafeUnpin for RemoteGitBackendConfig
impl UnwindSafe for RemoteGitBackendConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more