pub struct ServerInfo {
pub server_id: String,
pub version: String,
pub go: String,
pub host: String,
pub port: u32,
pub max_payload: usize,
pub proto: u32,
pub client_id: u64,
pub auth_required: bool,
pub tls_required: bool,
pub tls_verify: bool,
pub connect_urls: Vec<String>,
}
INFO from nats.io server {["option_name":option_value],...}
The valid options are as follows:
- server_id: The unique identifier of the NATS server
- version: The version of the NATS server
- go: The version of golang the NATS server was built with
- host: The IP address used to start the NATS server, by default this will be 0.0.0.0 and can be configured with -client_advertise host:port
- port: The port number the NATS server is configured to listen on
- max_payload: Maximum payload size, in bytes, that the server will accept from the client.
- proto: An integer indicating the protocol version of the server. The server version 1.2.0 sets this to 1 to indicate that it supports the “Echo” feature.
- client_id: An optional unsigned integer (64 bits) representing the internal client identifier in the server. This can be used to filter client connections in monitoring, correlate with error logs, etc…
- auth_required: If this is set, then the client should try to authenticate upon connect.
- tls_required: If this is set, then the client must perform the TLS/1.2 handshake. Note, this used to be ssl_required and has been updated along with the protocol from SSL to TLS.
- tls_verify: If this is set, the client must provide a valid certificate during the TLS handshake.
- connect_urls : An optional list of server urls that a client can connect to.
Performs copy-assignment from source
. Read more
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
Returns the "default value" for a type. Read more
Formats the value using the given formatter. Read more
Serialize this value into the given Serde serializer. Read more
Deserialize this value from the given Serde deserializer. Read more
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)