Crate ttrpc

Source
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).

§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;sync

Modules§

asynchronousasync
Server and client in async mode (alias r#async).
context
error
Error and Result of ttrpc and relevant functions, macros.
proto
syncsync
Server and Client in sync mode.

Macros§

async_client_requestasync
Send request through async client.
async_client_streamasync
Duplex streaming through async client.
async_client_stream_receiveasync
Only receive streaming through async client.
async_client_stream_sendasync
Only send streaming through async client.
async_client_streamimg_handlerasync
Handle client streaming in async mode.
async_duplex_streamimg_handlerasync
Handle duplex streaming in async mode.
async_request_handlerasync
Handle request in async mode.
async_server_streamimg_handlerasync
Handle server streaming in async mode.
client_requestsync
Send request through sync client.
err_to_others
Convert to ttrpc::Error::Others.
request_handlersync
Handle request in sync mode.

Structs§

MessageHeader
Message header of ttrpc.
Request
Response
Serversync
A ttrpc Server (sync).
Status
TtrpcContextsync
The context of ttrpc (sync).

Enums§

Code
Error
The error type for ttrpc.

Traits§

MethodHandlersync
Trait that implements handler which is a proxy to the desired method (sync).

Functions§

get_status
Get ttrpc::Status from ttrpc::Code and a message.

Type Aliases§

Result
A specialized Result type for ttrpc.