-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d4e2e3d
commit dc46054
Showing
2 changed files
with
7 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ port=9090 | |
service="microvm.services.api.v1alpha1.MicroVM" | ||
method="ListMicroVMs" | ||
|
||
if ! which grpcurl >/dev/null 2>/dev/null; then | ||
if ! which grpc-client-cli >/dev/null 2>/dev/null; then | ||
echo "!!! grpcurl is not installed. Please install this awesome tool." >&2 | ||
echo "" >&2 | ||
echo " go install github.com/vadimi/grpc-client-cli/cmd/[email protected]" >&2 | ||
|
@@ -57,9 +57,11 @@ done | |
|
||
pushd "$(dirname "${0}")" > /dev/null | ||
|
||
grpcurl -d @ \ | ||
-plaintext "${host}:${port}" \ | ||
"${service}/${method}" \ | ||
# I know using < is better than | but every time I tried the grpc-client-cli | ||
# failed to parse the json with 'invalid character' errors so :shrug_emoji: | ||
cat "payload/${method}.json" | grpc-client-cli \ | ||
-s "${service} -m ${method}" \ | ||
"${host}:${port}" \ | ||
< "payload/${method}.json" | ||
|
||
popd > /dev/null |