Перейти к основному содержимому
Эта страница ещё не переведена

Ниже показан английский оригинал.

Server

The server reports the endpoint's host and port with the protocol kinesis, the regional host when a region is named, and never a credential.

A broker registered with with_broker_labeled is a server of the document, under its label. Its protocol is kinesis, and its host comes from the first of these that applies:

  1. a broker with an endpoint reports that URL's host and port; the scheme and any user name and password stay out;
  2. a broker with a region reports that region's host, kinesis.<region>.amazonaws.com;
  3. any other broker reports kinesis.amazonaws.com, because its region resolves from the environment only when it connects.

The host comes from the broker's own steps. A broker built with from_config connects where its config points and reports a host from its steps all the same.

Example​

The broker runs in eu-west-1, and the document reports kinesis.eu-west-1.amazonaws.com.

/// The broker in `eu-west-1`, whose regional endpoint the document reports.
fn broker() -> KinesisBroker {
KinesisBroker::new().region("eu-west-1")
}