chore(psk): rename boot_file to init_file
This commit is contained in:
parent
2f18f5e8b5
commit
4ca9628899
|
@ -6,14 +6,14 @@ psk {
|
|||
## Whether to enable the PSK feature.
|
||||
enable = true
|
||||
|
||||
## If boot file is specified, emqx will import PSKs from the file
|
||||
## If init file is specified, emqx will import PSKs from the file
|
||||
## into the built-in database at startup for use by the runtime.
|
||||
##
|
||||
## The file has to be structured line-by-line, each line must be in
|
||||
## the format: <PSKIdentity>:<SharedSecret>
|
||||
## boot_file = {{ platform_data_dir }}/boot.psk
|
||||
## init_file = {{ platform_data_dir }}/init.psk
|
||||
|
||||
## Specifies the separator for PSKIdentity and SharedSecret in the boot file.
|
||||
## Specifies the separator for PSKIdentity and SharedSecret in the init file.
|
||||
## The default is colon (:)
|
||||
## separator = ":"
|
||||
}
|
||||
|
|
|
@ -110,7 +110,7 @@ init(_Opts) ->
|
|||
true -> load();
|
||||
false -> ok
|
||||
end,
|
||||
case boot_file() of
|
||||
case init_file() of
|
||||
undefined -> ok;
|
||||
BootFile -> import_psks(BootFile)
|
||||
end,
|
||||
|
@ -145,8 +145,8 @@ code_change(_OldVsn, State, _Extra) ->
|
|||
is_enable() ->
|
||||
emqx_config:get([psk, enable]).
|
||||
|
||||
boot_file() ->
|
||||
emqx_config:get([psk, boot_file], undefined).
|
||||
init_file() ->
|
||||
emqx_config:get([psk, init_file], undefined).
|
||||
|
||||
separator() ->
|
||||
emqx_config:get([psk, separator], ?DEFAULT_DELIMITER).
|
||||
|
|
|
@ -28,7 +28,7 @@ roots() -> [].
|
|||
|
||||
fields("psk") ->
|
||||
[ {enable, fun enable/1}
|
||||
, {boot_file, fun boot_file/1}
|
||||
, {init_file, fun init_file/1}
|
||||
, {separator, fun separator/1}
|
||||
].
|
||||
|
||||
|
@ -36,9 +36,9 @@ enable(type) -> boolean();
|
|||
enable(default) -> false;
|
||||
enable(_) -> undefined.
|
||||
|
||||
boot_file(type) -> binary();
|
||||
boot_file(nullable) -> true;
|
||||
boot_file(_) -> undefined.
|
||||
init_file(type) -> binary();
|
||||
init_file(nullable) -> true;
|
||||
init_file(_) -> undefined.
|
||||
|
||||
separator(type) -> binary();
|
||||
separator(default) -> <<":">>;
|
||||
|
|
Loading…
Reference in New Issue