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

Modules

Server and client in async mode (alias r#async).

Error and Result of ttrpc and relevant functions, macros.

Generated file from ttrpc.proto

syncsync

Server and Client in sync mode.

Macros

Send request through async client.

Handle request in async mode.

Send request through sync client.

Convert to ttrpc::Error::Others.

Handle request in sync mode.

Structs

A ttrpc Client (sync).

Message header of ttrpc.

Generated files are compatible only with the same version of protobuf runtime.

A ttrpc Server (sync).

The context of ttrpc (sync).

Enums

The error type for ttrpc.

Traits

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

Functions

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

Type Definitions

A specialized Result type for ttrpc.