containerd / ttrpc-rust

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

api: add metadata for server and client #76

Closed liubin closed 3 years ago

liubin commented 3 years ago

For tracing purpose, it needs to pass metadata like span id to the server. ttrpc-rust should then parse the metadata to service handler by TtrpcContext

This commit is mainly a porting of parts of metadata_test.go and types.go if go version, and now only working on server side.

Signed-off-by: bin liu bin@hyper.sh

liubin commented 3 years ago

ping @lifupan @Tim-Zhang

Tim-Zhang commented 3 years ago

Since the TtrpcContext is public, this pr have changed the API, and we have to update the major version.

@liubin I will merge the pr after creating the 0.4.0 branch , and before the 0.5.0 published we should accumulate more features

I will create a pr to upgrade the tokio to v1.0 in a few days, the new major version 0.5.0 will includes these two features at least so it will take some days.

Tim-Zhang commented 3 years ago

@liubin I think we should change the pr title so that it can describe all features include new commits.