connect

Function connect 

Source
pub fn connect(
    servers: impl IntoIterator<Item = impl ToString>,
) -> Result<NatsClient, SdkError>
Expand description

Connects to one or more NATS servers

§Arguments

  • servers - Iterator of server addresses to connect to

§Returns

Result containing the connected NATS client or an error if connection fails