Go で Network Programming するためのよもやま話 / Network Programming with Go
Go で Network Programming するためのよもやま話 / Network Programming with Go
結論 wrappers.protoが便利 背景 protobufでは値を省略したときに、その型で定められたデフォルト値が代入されます。 例えばstringを省略すると自動的に""を指定したことになり、「値が指定されなかった」のか「空文字列を明示的に入れた」のかを区別しないように書くことが求められます。 この仕様は便利なのですが、時には区別したいケースもあります。 このとき下の方式2, 3のようなテクニックを用いて未指定とデフォルト値を区別することができます。 message Example { // 1. ダイレクトに定義(デフォルト値と未指定を区別できない) string foo = 1; // 2. 専用のmessageを定義 message Bar { string value = 1; } Bar bar = 2; // 3. oneofで定義 oneof baz_option {
EngineeringGLB: GitHub’s open source load balancerAt GitHub, we serve tens of thousands of requests every second out of our network edge, operating on GitHub's metal cloud. We've previously introduced GLB, our scalable load balancing solution… At GitHub, we serve tens of thousands of requests every second out of our network edge, operating on GitHub’s metal cloud. We’ve previously introduced GLB,
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く