Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow arbitrary bytes as upstream name of grpc call #124

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/hostcalls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ extern "C" {
}

pub fn dispatch_grpc_call(
upstream_name: &str,
upstream: &[u8],
service_name: &str,
method_name: &str,
initial_metadata: Vec<(&str, &[u8])>,
Expand All @@ -804,8 +804,8 @@ pub fn dispatch_grpc_call(
let serialized_initial_metadata = utils::serialize_map_bytes(initial_metadata);
unsafe {
match proxy_grpc_call(
upstream_name.as_ptr(),
upstream_name.len(),
upstream.as_ptr(),
upstream.len(),
service_name.as_ptr(),
service_name.len(),
method_name.as_ptr(),
Expand Down
4 changes: 2 additions & 2 deletions src/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,15 @@ pub trait Context {

fn dispatch_grpc_call(
&self,
upstream_name: &str,
upstream: &[u8],
service_name: &str,
method_name: &str,
initial_metadata: Vec<(&str, &[u8])>,
message: Option<&[u8]>,
timeout: Duration,
) -> Result<u32, Status> {
hostcalls::dispatch_grpc_call(
upstream_name,
upstream,
service_name,
method_name,
initial_metadata,
Expand Down