Add options for gen_rpc
This commit is contained in:
parent
07d815b3f7
commit
b61d72cdcd
|
@ -303,6 +303,11 @@ rpc.tcp_server_port = 5369
|
||||||
## Value: Port [1024-65535]
|
## Value: Port [1024-65535]
|
||||||
rpc.tcp_client_port = 5369
|
rpc.tcp_client_port = 5369
|
||||||
|
|
||||||
|
## Number of utgoing RPC connections.
|
||||||
|
##
|
||||||
|
## Value: Interger [1-256]
|
||||||
|
rpc.tcp_client_num = 32
|
||||||
|
|
||||||
## RCP Client connect timeout.
|
## RCP Client connect timeout.
|
||||||
##
|
##
|
||||||
## Value: Seconds
|
## Value: Seconds
|
||||||
|
@ -338,6 +343,21 @@ rpc.socket_keepalive_interval = 75s
|
||||||
## Value: Integer
|
## Value: Integer
|
||||||
rpc.socket_keepalive_count = 9
|
rpc.socket_keepalive_count = 9
|
||||||
|
|
||||||
|
## Size of TCP send buffer.
|
||||||
|
##
|
||||||
|
## Value: Bytes
|
||||||
|
rpc.socket_sndbuf = 1MB
|
||||||
|
|
||||||
|
## Size of TCP receive buffer.
|
||||||
|
##
|
||||||
|
## Value: Seconds
|
||||||
|
rpc.socket_recbuf = 1MB
|
||||||
|
|
||||||
|
## Size of user-level software socket buffer.
|
||||||
|
##
|
||||||
|
## Value: Seconds
|
||||||
|
rpc.socket_buffer = 1MB
|
||||||
|
|
||||||
##--------------------------------------------------------------------
|
##--------------------------------------------------------------------
|
||||||
## Log
|
## Log
|
||||||
##--------------------------------------------------------------------
|
##--------------------------------------------------------------------
|
||||||
|
|
|
@ -350,6 +350,13 @@ end}.
|
||||||
{datatype, integer}
|
{datatype, integer}
|
||||||
]}.
|
]}.
|
||||||
|
|
||||||
|
%% Default TCP port for outgoing connections
|
||||||
|
{mapping, "rpc.tcp_client_num", "gen_rpc.tcp_client_num", [
|
||||||
|
{default, 32},
|
||||||
|
{datatype, integer},
|
||||||
|
{validators, ["range:gt_0_lt_256"]}
|
||||||
|
]}.
|
||||||
|
|
||||||
%% Client connect timeout
|
%% Client connect timeout
|
||||||
{mapping, "rpc.connect_timeout", "gen_rpc.connect_timeout", [
|
{mapping, "rpc.connect_timeout", "gen_rpc.connect_timeout", [
|
||||||
{default, "5s"},
|
{default, "5s"},
|
||||||
|
@ -392,6 +399,28 @@ end}.
|
||||||
{datatype, integer}
|
{datatype, integer}
|
||||||
]}.
|
]}.
|
||||||
|
|
||||||
|
%% Size of TCP send buffer
|
||||||
|
{mapping, "rpc.socket_sndbuf", "gen_rpc.socket_sndbuf", [
|
||||||
|
{default, "1MB"},
|
||||||
|
{datatype, bytesize}
|
||||||
|
]}.
|
||||||
|
|
||||||
|
%% Size of TCP receive buffer
|
||||||
|
{mapping, "rpc.socket_recbuf", "gen_rpc.socket_recbuf", [
|
||||||
|
{default, "1MB"},
|
||||||
|
{datatype, bytesize}
|
||||||
|
]}.
|
||||||
|
|
||||||
|
%% Size of TCP receive buffer
|
||||||
|
{mapping, "rpc.socket_buffer", "gen_rpc.socket_buffer", [
|
||||||
|
{default, "1MB"},
|
||||||
|
{datatype, bytesize}
|
||||||
|
]}.
|
||||||
|
|
||||||
|
{validator, "range:gt_0_lt_256", "must greater than 0 and less than 256",
|
||||||
|
fun(X) -> X > 0 andalso X < 256 end
|
||||||
|
}.
|
||||||
|
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
%% Log
|
%% Log
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue