Эта страница ещё не переведена
Ниже показан английский оригинал.
Server
The file broker reports the path of its stream file and the stdio broker its protocol name; neither reports a host.
A broker registered with with_broker_labeled is a server of the document, under its label.
Both transports run inside the process, with nothing to connect to over a network, so a server has no host.
The file broker's protocol is file, and its description is the path of the stream file, where a reader finds the log.
The stdio broker's protocol is stdio, and it reports nothing else.
Neither server carries a protocolVersion or bindings.
Example
The stream file and the pipeline, registered under the labels file and pipe, come out as these two servers:
"servers": {
"file": { "protocol": "file", "description": "/var/lib/ruststream/orders.ss" },
"pipe": { "protocol": "stdio" }
}
- Macros
- Manual
/// The stream file the service records orders in.
fn file_broker() -> FileBroker {
FileBroker::new("/var/lib/ruststream/orders.ss")
}
/// The pipeline the service is a stage of.
fn stdio_broker() -> StdioBroker {
StdioBroker::new()
}
/// The stream file the service records orders in.
fn file_broker() -> FileBroker {
FileBroker::new("/var/lib/ruststream/orders.ss")
}
/// The pipeline the service is a stage of.
fn stdio_broker() -> StdioBroker {
StdioBroker::new()
}