Expand description
ttrpc-rust is a non-core subproject of containerd
ttrpc-rust
is the Rust version of ttrpc. ttrpc is GRPC for low-memory environments.
Example:
Check this
Feature flags
async
: Enables async server and client.sync
: Enables traditional sync server and client (default enabled).protobuf-codec
: Includes rust-protobuf (default enabled).
Socket address
For Linux distributions, ttrpc-rust supports three types of socket:
unix:///run/some.sock
: Normal Unix domain socket.unix://@/run/some.sock
: Abstract Unix domain socket.vsock://vsock://8:1024
: vsock.
For mscOS, ttrpc-rust only supports normal Unix domain socket:
unix:///run/some.sock
: Normal Unix domain socket.
Re-exports
pub use sync::Client;
Modules
- asynchronous
async
Server and client in async mode (alias r#async). - Error and Result of ttrpc and relevant functions, macros.
- sync
sync
Server and Client in sync mode.
Macros
- async_client_request
async
Send request through async client. - async_client_stream
async
Duplex streaming through async client. - Only receive streaming through async client.
- Only send streaming through async client.
- Handle client streaming in async mode.
- Handle duplex streaming in async mode.
- Handle request in async mode.
- Handle server streaming in async mode.
- client_request
sync
Send request through sync client. - Convert to ttrpc::Error::Others.
- request_handler
sync
Handle request in sync mode.
Structs
- Message header of ttrpc.
- Server
sync
A ttrpc Server (sync). - TtrpcContext
sync
The context of ttrpc (sync).
Enums
- The error type for ttrpc.
Traits
- MethodHandler
sync
Trait that implements handler which is a proxy to the desired method (sync).
Functions
- Get ttrpc::Status from ttrpc::Code and a message.
Type Aliases
- A specialized Result type for ttrpc.