Skip to main content

jetstream_context_from_env

Function jetstream_context_from_env 

Source
pub fn jetstream_context_from_env(client: Client, domain_var: &str) -> Context
Expand description

Creates a JetStream context using a domain name read from an environment variable.

If the variable is set and not blank, its trimmed value is used as the JetStream domain. Otherwise the context has no domain.

ยงArguments

  • client - Connected NATS client; the context takes ownership of it.
  • domain_var - Name of the environment variable holding the domain.