containerd / ttrpc-rust

Rust implementation of ttrpc (GRPC for low-memory environments)
Apache License 2.0
195 stars 45 forks source link

Add client connect #93

Closed mxpv closed 3 years ago

mxpv commented 3 years ago

In current implementation Client must be created from RawFd handle. This forces crate users to import nix dependency in their projects just to create a Client instance. So this PR adds a shortcut Client::connect(path) to make it more user friendly.

Signed-off-by: Maksym Pavlenko pavlenko.maksym@gmail.com

Tim-Zhang commented 3 years ago

@mxpv I think we should also handle the vsock connection

mxpv commented 3 years ago

I haven't tried/tested vsock connections (I have a slightly different use case). I can TAL later on it as well. Meantime would you be interested to have this PR as is?

Tim-Zhang commented 3 years ago

@mxpv I think you can add a adjective for names of client_connect and connect like connect_unix or something to clarify vsock is not supported.

mxpv commented 3 years ago

@Tim-Zhang updated

mxpv commented 3 years ago

@Tim-Zhang good catch, thanks. done.