pub struct SdkContextConfig {
pub network: Network,
pub api_key: Option<String>,
pub connections_per_operator: Option<u32>,
pub storage: Option<Arc<dyn StorageBackend>>,
}Expand description
Settings for new_shared_sdk_context. All fields are optional; the defaults
match the single-SDK happy path.
Fields§
§network: NetworkNetwork the shared resources target. Defaults to Network::Mainnet.
Used to gate the partner JWT header provider — only constructed on
Mainnet, since Regtest has no JWT-issuing Breez endpoint.
api_key: Option<String>Breez API key. When set together with network == Mainnet, the
context constructs a shared partner JWT header provider that all
SDKs built from this context will attach to their SO requests.
connections_per_operator: Option<u32>Number of gRPC connections per Spark operator. None (or Some(1))
keeps a single connection per operator (the right choice for most
deployments); Some(n) opens n channels per operator and balances
requests across them.
storage: Option<Arc<dyn StorageBackend>>Shared storage backend for SDKs built from this context. When set,
every SDK built from the context reuses it (and its database
connection pool). Construct via
default_storage,
postgres_storage,
mysql_storage or
custom_storage.
Implementations§
Auto Trait Implementations§
impl Freeze for SdkContextConfig
impl !RefUnwindSafe for SdkContextConfig
impl Send for SdkContextConfig
impl Sync for SdkContextConfig
impl Unpin for SdkContextConfig
impl UnsafeUnpin for SdkContextConfig
impl !UnwindSafe for SdkContextConfig
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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 moreSource§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