Merge pull request #6922 from k32/static-seeds-type

refactor(schema): Refactor cluster_static seeds type
This commit is contained in:
zhongwencool 2022-02-09 16:34:30 +08:00 committed by GitHub
commit 94b0676ac6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -147,7 +147,7 @@ fields("cluster") ->
fields(cluster_static) ->
[ {"seeds",
sc(hoconsc:array(string()),
sc(hoconsc:array(atom()),
#{ default => []
})}
];
@ -855,7 +855,7 @@ map(Name, Type) -> hoconsc:map(Name, Type).
ref(Field) -> hoconsc:ref(?MODULE, Field).
options(static, Conf) ->
[{seeds, [to_atom(S) || S <- conf_get("cluster.static.seeds", Conf, [])]}];
[{seeds, conf_get("cluster.static.seeds", Conf, [])}];
options(mcast, Conf) ->
{ok, Addr} = inet:parse_address(conf_get("cluster.mcast.addr", Conf)),
{ok, Iface} = inet:parse_address(conf_get("cluster.mcast.iface", Conf)),