Skip to content

Commit

Permalink
feat: convert uuid bytes to string then uuid
Browse files Browse the repository at this point in the history
  • Loading branch information
oddgrd committed Nov 20, 2022
1 parent 2e77bb0 commit 0a1b29c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 3 additions & 2 deletions runtime/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ Then in another shell, load a `.so` file and start it up:
# load
grpcurl -plaintext -import-path ../proto -proto runtime.proto -d '{"service_name": "Tonic", "path": "examples/rocket/hello-world/target/debug/libhello_world.so"}' localhost:6001 runtime.Runtime/Load

# run
grpcurl -plaintext -import-path ../proto -proto runtime.proto -d '{"service_name": "Tonic"}' localhost:6001 runtime.Runtime/Start
# run (this deployment id is default uuid encoded as base64)
grpcurl -plaintext -import-path ../proto -proto runtime.proto -d '{"service_name": "Tonic", "deployment_id": "MDAwMDAwMDAtMDAwMC0wMDAwLTAwMDAtMDAwMDAwMDAwMDAw"}' localhost:6001 runti
me.Runtime/Start

# subscribe to logs
grpcurl -plaintext -import-path ../proto -proto runtime.proto localhost:6001 runtime.Runtime/SubscribeLogs
Expand Down
5 changes: 4 additions & 1 deletion runtime/src/legacy/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ impl Runtime for Legacy {
let mut factory = abstract_factory.get_factory(service_name);

let logs_tx = self.logs_tx.lock().unwrap().clone();
let deployment_id = Uuid::from_slice(&request.deployment_id).unwrap();

let deployment_id =
Uuid::from_str(std::str::from_utf8(&request.deployment_id).unwrap()).unwrap();

let logger = Logger::new(logs_tx, deployment_id);

let so_path = self
Expand Down

0 comments on commit 0a1b29c

Please sign in to comment.