Add RPC Args
This commit is contained in:
parent
62aa072f2f
commit
b3adcc8971
|
@ -137,6 +137,11 @@ cluster.autoclean = 5m
|
||||||
## Value: String
|
## Value: String
|
||||||
## cluster.k8s.app_name = emq
|
## cluster.k8s.app_name = emq
|
||||||
|
|
||||||
|
## Kubernates Namespace
|
||||||
|
##
|
||||||
|
## Value: String
|
||||||
|
## cluster.k8s.namespace = default
|
||||||
|
|
||||||
##--------------------------------------------------------------------
|
##--------------------------------------------------------------------
|
||||||
## Node Args
|
## Node Args
|
||||||
##--------------------------------------------------------------------
|
##--------------------------------------------------------------------
|
||||||
|
@ -270,6 +275,39 @@ node.dist_net_ticktime = 60
|
||||||
node.dist_listen_min = 6369
|
node.dist_listen_min = 6369
|
||||||
node.dist_listen_max = 6369
|
node.dist_listen_max = 6369
|
||||||
|
|
||||||
|
##--------------------------------------------------------------------
|
||||||
|
## RPC Args
|
||||||
|
##--------------------------------------------------------------------
|
||||||
|
|
||||||
|
## TCP server port.
|
||||||
|
rpc.tcp_server_port = 5369
|
||||||
|
|
||||||
|
## Default TCP port for outgoing connections
|
||||||
|
rpc.tcp_client_port = 5369
|
||||||
|
|
||||||
|
## Client connect timeout
|
||||||
|
rpc.connect_timeout = 5000
|
||||||
|
|
||||||
|
## Client and Server send timeout
|
||||||
|
rpc.send_timeout = 5000
|
||||||
|
|
||||||
|
## Authentication timeout
|
||||||
|
rpc.authentication_timeout = 5000
|
||||||
|
|
||||||
|
## Default receive timeout for call() functions
|
||||||
|
rpc.call_receive_timeout = 15000
|
||||||
|
|
||||||
|
## Socket keepalive configuration
|
||||||
|
rpc.socket_keepalive_idle = 900
|
||||||
|
|
||||||
|
## Seconds between probes
|
||||||
|
rpc.socket_keepalive_interval = 75
|
||||||
|
|
||||||
|
## Probes lost to close the connection
|
||||||
|
rpc.socket_keepalive_count = 9
|
||||||
|
|
||||||
|
## TODO: sndbuf, rcvbuf and buffer
|
||||||
|
|
||||||
##--------------------------------------------------------------------
|
##--------------------------------------------------------------------
|
||||||
## Log
|
## Log
|
||||||
##--------------------------------------------------------------------
|
##--------------------------------------------------------------------
|
||||||
|
|
|
@ -124,6 +124,10 @@
|
||||||
{datatype, string}
|
{datatype, string}
|
||||||
]}.
|
]}.
|
||||||
|
|
||||||
|
{mapping, "cluster.k8s.namespace", "ekka.cluster_discovery", [
|
||||||
|
{datatype, string}
|
||||||
|
]}.
|
||||||
|
|
||||||
{translation, "ekka.cluster_discovery", fun(Conf) ->
|
{translation, "ekka.cluster_discovery", fun(Conf) ->
|
||||||
Strategy = cuttlefish:conf_get("cluster.discovery", Conf),
|
Strategy = cuttlefish:conf_get("cluster.discovery", Conf),
|
||||||
Filter = fun(Opts) -> [{K, V} || {K, V} <- Opts, V =/= undefined] end,
|
Filter = fun(Opts) -> [{K, V} || {K, V} <- Opts, V =/= undefined] end,
|
||||||
|
@ -152,7 +156,8 @@
|
||||||
[{apiserver, cuttlefish:conf_get("cluster.k8s.apiserver", Conf)},
|
[{apiserver, cuttlefish:conf_get("cluster.k8s.apiserver", Conf)},
|
||||||
{service_name, cuttlefish:conf_get("cluster.k8s.service_name", Conf)},
|
{service_name, cuttlefish:conf_get("cluster.k8s.service_name", Conf)},
|
||||||
{address_type, cuttlefish:conf_get("cluster.k8s.address_type", Conf, ip)},
|
{address_type, cuttlefish:conf_get("cluster.k8s.address_type", Conf, ip)},
|
||||||
{app_name, cuttlefish:conf_get("cluster.k8s.app_name", Conf)}];
|
{app_name, cuttlefish:conf_get("cluster.k8s.app_name", Conf)},
|
||||||
|
{namespace, cuttlefish:conf_get("cluster.k8s.namespace", Conf)}];
|
||||||
(manual) ->
|
(manual) ->
|
||||||
[ ]
|
[ ]
|
||||||
end,
|
end,
|
||||||
|
@ -170,7 +175,7 @@ end}.
|
||||||
|
|
||||||
%% @doc The erlang distributed protocol
|
%% @doc The erlang distributed protocol
|
||||||
{mapping, "node.proto_dist", "vm_args.-proto_dist", [
|
{mapping, "node.proto_dist", "vm_args.-proto_dist", [
|
||||||
{default, "inet_tcp"},
|
%{default, "inet_tcp"},
|
||||||
{datatype, {enum, [inet_tcp, inet6_tcp, inet_tls]}},
|
{datatype, {enum, [inet_tcp, inet6_tcp, inet_tls]}},
|
||||||
hidden
|
hidden
|
||||||
]}.
|
]}.
|
||||||
|
@ -315,6 +320,64 @@ end}.
|
||||||
hidden
|
hidden
|
||||||
]}.
|
]}.
|
||||||
|
|
||||||
|
%%--------------------------------------------------------------------
|
||||||
|
%% RPC Args
|
||||||
|
%%--------------------------------------------------------------------
|
||||||
|
|
||||||
|
%% RPC server port.
|
||||||
|
{mapping, "rpc.tcp_server_port", "gen_rpc.tcp_server_port", [
|
||||||
|
{default, 5369},
|
||||||
|
{datatype, integer}
|
||||||
|
]}.
|
||||||
|
|
||||||
|
%% Default TCP port for outgoing connections
|
||||||
|
{mapping, "rpc.tcp_client_port", "gen_rpc.tcp_client_port", [
|
||||||
|
{default, 5369},
|
||||||
|
{datatype, integer}
|
||||||
|
]}.
|
||||||
|
|
||||||
|
%% Client connect timeout
|
||||||
|
{mapping, "rpc.connect_timeout", "gen_rpc.connect_timeout", [
|
||||||
|
{default, 5000},
|
||||||
|
{datatype, integer}
|
||||||
|
]}.
|
||||||
|
|
||||||
|
%% Client and Server send timeout
|
||||||
|
{mapping, "rpc.send_timeout", "gen_rpc.send_timeout", [
|
||||||
|
{default, 5000},
|
||||||
|
{datatype, integer}
|
||||||
|
]}.
|
||||||
|
|
||||||
|
%% Authentication timeout
|
||||||
|
{mapping, "rpc.authentication_timeout", "gen_rpc.authentication_timeout", [
|
||||||
|
{default, 5000},
|
||||||
|
{datatype, integer}
|
||||||
|
]}.
|
||||||
|
|
||||||
|
%% Default receive timeout for call() functions
|
||||||
|
{mapping, "rpc.call_receive_timeout", "gen_rpc.call_receive_timeout", [
|
||||||
|
{default, 15000},
|
||||||
|
{datatype, integer}
|
||||||
|
]}.
|
||||||
|
|
||||||
|
%% Socket keepalive configuration
|
||||||
|
{mapping, "rpc.socket_keepalive_idle", "gen_rpc.socket_keepalive_idle", [
|
||||||
|
{default, 7200},
|
||||||
|
{datatype, integer}
|
||||||
|
]}.
|
||||||
|
|
||||||
|
%% Seconds between probes
|
||||||
|
{mapping, "rpc.socket_keepalive_interval", "gen_rpc.socket_keepalive_interval", [
|
||||||
|
{default, 75},
|
||||||
|
{datatype, integer}
|
||||||
|
]}.
|
||||||
|
|
||||||
|
%% Probes lost to close the connection
|
||||||
|
{mapping, "rpc.socket_keepalive_count", "gen_rpc.socket_keepalive_count", [
|
||||||
|
{default, 9},
|
||||||
|
{datatype, integer}
|
||||||
|
]}.
|
||||||
|
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
%% Log
|
%% Log
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue