Created
December 31, 2019 02:37
-
-
Save gistlyn/9fb8f50149c1bf7aef7082541486ddc3 to your computer and use it in GitHub Desktop.
Ruby Google protoc insecure GrpcServices Client TodoWorld Example
This file contains hidden or 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
#!/usr/bin/env ruby | |
this_dir = File.expand_path(File.dirname(__FILE__)) | |
lib_dir = File.join(this_dir, 'lib') | |
$LOAD_PATH.unshift(lib_dir) unless $LOAD_PATH.include?(lib_dir) | |
require 'grpc' | |
require 'services_pb' | |
require 'services_services_pb' | |
def main | |
client = GrpcServices::Stub.new('todoworld.servicestack.net:5054', | |
:this_channel_is_insecure) | |
response = client.get_hello(Hello.new(Name:'gRPC Ruby')) | |
puts response.Result | |
end | |
main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment