pub struct WashConnectionOptions {
pub ctl_host: Option<String>,
pub ctl_port: Option<String>,
pub ctl_jwt: Option<String>,
pub ctl_seed: Option<String>,
pub ctl_credsfile: Option<PathBuf>,
pub ctl_tls_ca_file: Option<PathBuf>,
pub ctl_tls_first: Option<bool>,
pub js_domain: Option<String>,
pub lattice: Option<String>,
pub timeout_ms: u64,
pub ctx: WashContext,
}Expand description
Connection options for a Wash instance
Fields§
§ctl_host: Option<String>CTL Host for connection, defaults to 127.0.0.1 for local nats
ctl_port: Option<String>CTL Port for connections, defaults to 4222 for local nats
ctl_jwt: Option<String>JWT file for CTL authentication. Must be supplied with ctl_seed.
ctl_seed: Option<String>Seed file or literal for CTL authentication. Must be supplied with ctl_jwt.
ctl_credsfile: Option<PathBuf>Credsfile for CTL authentication. Combines ctl_seed and ctl_jwt. See https://docs.nats.io/using-nats/developer/connecting/creds for details.
ctl_tls_ca_file: Option<PathBuf>Path to a file containing a CA certificate to use for TLS connections
ctl_tls_first: Option<bool>Perform TLS handshake before expecting the server greeting.
js_domain: Option<String>JS domain for wasmcloud control interface. Defaults to None
lattice: Option<String>Lattice name for wasmcloud control interface, defaults to “default”
timeout_ms: u64Timeout length to await a control interface response, defaults to 2000 milliseconds
ctx: WashContextWash context
Implementations§
Source§impl WashConnectionOptions
impl WashConnectionOptions
Sourcepub async fn into_ctl_client(
self,
auction_timeout_ms: Option<u64>,
) -> Result<CtlClient>
pub async fn into_ctl_client( self, auction_timeout_ms: Option<u64>, ) -> Result<CtlClient>
Create a control client from connection options
Sourcepub async fn into_nats_client(self) -> Result<Client>
pub async fn into_nats_client(self) -> Result<Client>
Create a NATS client from WashConnectionOptions
Sourcepub fn get_lattice(&self) -> String
pub fn get_lattice(&self) -> String
Either returns the opts.lattice or opts.ctx.lattice… if both are absent/None, returns the default lattice prefix (DEFAULT_LATTICE).
Trait Implementations§
Source§impl Clone for WashConnectionOptions
impl Clone for WashConnectionOptions
Source§fn clone(&self) -> WashConnectionOptions
fn clone(&self) -> WashConnectionOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for WashConnectionOptions
impl Default for WashConnectionOptions
Source§fn default() -> WashConnectionOptions
fn default() -> WashConnectionOptions
Auto Trait Implementations§
impl Freeze for WashConnectionOptions
impl RefUnwindSafe for WashConnectionOptions
impl Send for WashConnectionOptions
impl Sync for WashConnectionOptions
impl Unpin for WashConnectionOptions
impl UnwindSafe for WashConnectionOptions
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
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> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
self file descriptor. Read moreSource§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>
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 more