# finagle_ruby_examples **Repository Path**: walter80/finagle_ruby_examples ## Basic Information - **Project Name**: finagle_ruby_examples - **Description**: finagle ruby教程 - **Primary Language**: Ruby - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-04-23 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README git remote rm origin 已存在的文件夹或 Git 仓库 cd existing_folder git init git remote add origin git@gitee.com:walter80/finagle_ruby_examples.git git add . git commit git push -u origin master # ruby-finagle-thrift-client-example finagle-thrift を使ったRPCクライアントのRuby最小(当社比)実装。 [Rubyで作るfinagle-thriftクライント](https://qiita.com/laysakura/items/6993e442d513315e2da2)の記事で触れているサンプルコード。 ## 実行方法 ### Thrift定義からクライアントコードを生成 ```bash $ brew install thrift $ thrift --version Thrift version 0.11.0 $ thrift --gen rb hello_service.thrift $ ls gen-rb hello_service.rb hello_service_constants.rb hello_service_types.rb ``` ### クライアント実行 finagle-thrift に対応したサーバは利用可能な前提。 接続情報は `run.rb` を直接変更すること。 ```bash $ bundle install --path=vendor/bundle $ bundle exec ruby run.rb Response: 'Hello, John' TraceId: 9549be5ecbfacc56 ```