chore: support list(tuple()) for schema_with_examples/3
This commit is contained in:
parent
f04cafe57e
commit
b343653769
|
@ -185,7 +185,8 @@ fields(meta) ->
|
|||
schema_with_example(Type, Example) ->
|
||||
hoconsc:mk(Type, #{examples => #{<<"example">> => Example}}).
|
||||
|
||||
-spec schema_with_examples(hocon_schema:type(), map()) -> hocon_schema:field_schema_map().
|
||||
-spec schema_with_examples(hocon_schema:type(), map() | list(tuple())) ->
|
||||
hocon_schema:field_schema_map().
|
||||
schema_with_examples(Type, Examples) ->
|
||||
hoconsc:mk(Type, #{examples => #{<<"examples">> => Examples}}).
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ remove_handler() ->
|
|||
|
||||
post_config_update(?PROMETHEUS, _Req, New, Old, AppEnvs) ->
|
||||
update_prometheus(AppEnvs),
|
||||
update_push_gateway(New),
|
||||
_ = update_push_gateway(New),
|
||||
update_auth(New, Old);
|
||||
post_config_update(_ConfPath, _Req, _NewConf, _OldConf, _AppEnvs) ->
|
||||
ok.
|
||||
|
|
|
@ -44,6 +44,7 @@ start_link() ->
|
|||
start_child(Mod, Conf) when is_atom(Mod) ->
|
||||
assert_started(supervisor:start_child(?MODULE, ?CHILD(Mod, Conf))).
|
||||
|
||||
-spec update_child(pid() | atom(), map()) -> ok.
|
||||
update_child(Pid, Conf) ->
|
||||
erlang:send(Pid, {update, Conf}),
|
||||
ok.
|
||||
|
|
Loading…
Reference in New Issue