-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove thrift marco in user code. #383
Changes from 7 commits
c778e70
438be7a
aef1990
f91b303
c53d23a
51a58cc
c54466e
4b91206
908692f
57834a6
e63eaf1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,9 +22,9 @@ | |
|
||
DEFINE_string(attachment, "foo", "Carry this along with requests"); | ||
DEFINE_string(protocol, "baidu_std", "Protocol type. Defined in src/brpc/options.proto"); | ||
DEFINE_string(connection_type, "", "Connection type. Available values: single, pooled, short"); | ||
DEFINE_string(connection_type, "pooled", "Connection type. Available values: single, pooled, short"); | ||
DEFINE_string(server, "0.0.0.0:8000", "IP Address of server"); | ||
DEFINE_string(load_balancer, "", "The algorithm for load balancing"); | ||
DEFINE_string(load_balancer, "rr", "The algorithm for load balancing"); | ||
DEFINE_int32(timeout_ms, 100, "RPC timeout in milliseconds"); | ||
DEFINE_int32(max_retry, 3, "Max retries(not including the first RPC)"); | ||
DEFINE_int32(interval_ms, 1000, "Milliseconds between consecutive requests"); | ||
|
@@ -44,7 +44,7 @@ int main(int argc, char* argv[]) { | |
options.connection_type = FLAGS_connection_type; | ||
options.timeout_ms = FLAGS_timeout_ms/*milliseconds*/; | ||
options.max_retry = FLAGS_max_retry; | ||
if (channel.Init(FLAGS_server.c_str(), FLAGS_load_balancer.c_str(), &options) != 0) { | ||
if (channel.Init("file://server.list", FLAGS_load_balancer.c_str(), &options) != 0) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这里需要改回去 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 个人测试代码, 误操作, 已经回滚 |
||
LOG(ERROR) << "Fail to initialize channel"; | ||
return -1; | ||
} | ||
|
@@ -85,7 +85,7 @@ int main(int argc, char* argv[]) { | |
} else { | ||
LOG(WARNING) << cntl.ErrorText(); | ||
} | ||
usleep(FLAGS_interval_ms * 1000L); | ||
//usleep(FLAGS_interval_ms * 1000L); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 需要该回去 |
||
} | ||
|
||
LOG(INFO) << "EchoClient is going to quit"; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mac下没有readlink
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已经改回去了