ソースを参照

repair, other func

erlArango_v1
wangpei 5年前
コミット
821780732d
2個のファイルの変更89行の追加0行の削除
  1. +73
    -0
      src/arangoApi/agOtherFunc.erl
  2. +16
    -0
      src/arangoApi/agRepairJobs.erl

+ 73
- 0
src/arangoApi/agOtherFunc.erl ファイルの表示

@ -0,0 +1,73 @@
-module(agOtherFunc).
-include("erlArango.hrl").
-compile([export_all, nowarn_export_all]).
%% doc_address:https://www.arangodb.com/docs/stable/http/miscellaneous-functions.html
%% server版本
%% GET /_api/version
serverInfo(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?Get, <<"/_api/version">>, [], undefined).
%% server版本详细信息
%% GET /_api/version?details=true
serverDetails(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?Post, <<"/_api/version?details=true">>, [], undefined).
%% 使
%% GET /_api/engine
engine(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?Get, <<"/_api/engine">>, [], undefined).
%%
%% PUT /_admin/wal/flush
logFlush(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?Put, <<"/_admin/wal/flush">>, [], undefined).
%%
%% GET /_admin/wal/properties
walConfig(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?Get, <<"/_admin/wal/properties">>, [], undefined).
%%
%% PUT /_admin/wal/properties
setWalConfig(PoolNameOrSocket, LogFileSize, AllowOversizeEntries) ->
BodyStr = jiffy:encode(#{<<"logfileSize">> => LogFileSize, <<"allowOversizeEntries">> => AllowOversizeEntries}),
agHttpCli:callAgency(PoolNameOrSocket, ?Put, <<"/_admin/wal/properties">>, BodyStr, undefined).
%%
%% GET /_admin/wal/transactions
transactions(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?Get, <<"/_admin/wal/transactions">>, [], undefined).
%%
%% GET /_admin/time
ostime(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?Get, <<"/_admin/time">>, [], undefined).
%% 西
%% POST /_admin/echo
echo(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?Post, <<"/_admin/echo">>, [], undefined).
%%
%% GET /_admin/database/target-version
dbVersion(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?Get, <<"/_admin/database/target-version">>, [], undefined).
%% DELETE /_admin/shutdown
shutDown(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?Delete, <<"/_admin/shutdown">>, [], undefined).
%%
%% POST /_admin/execute
execute(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?Post, <<"/_admin/execute">>, [], undefined).
%%
%% GET /_admin/status
status(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?Get, <<"/_admin/status">>, [], undefined).

+ 16
- 0
src/arangoApi/agRepairJobs.erl ファイルの表示

@ -0,0 +1,16 @@
-module(agRepairJobs).
-include("erlArango.hrl").
-compile([export_all, nowarn_export_all]).
%% doc_address:https://www.arangodb.com/docs/stable/http/repairs.html
%%
%% GET /_admin/repairs/distributeShardsLike
checkRepir(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?Get, <<"/_admin/repairs/distributeShardsLike">>, [], undefined).
%%
%% POST /_admin/repairs/distributeShardsLike
repir(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?Post, <<"/_admin/repairs/distributeShardsLike">>, [], undefined).

読み込み中…
キャンセル
保存