瀏覽代碼

cluster

erlArango_v1
wangpei 5 年之前
父節點
當前提交
359d488329
共有 1 個文件被更改,包括 30 次插入0 次删除
  1. +30
    -0
      src/arangoApi/agCluster.erl

+ 30
- 0
src/arangoApi/agCluster.erl 查看文件

@ -0,0 +1,30 @@
-module(agCluster).
-include("erlArango.hrl").
-compile([export_all, nowarn_export_all]).
%% doc_address:https://www.arangodb.com/docs/stable/http/cluster.html
%% GET /_admin/server/id
serverId(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?Get, <<"/_admin/server/id">>, [], undefined).
%% GET /_admin/server/role
serverRole(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?Get, <<"/_admin/server/role">>, [], undefined).
%% GET /_admin/clusterStatistics
clusterStatistics(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?Get, <<"/_admin/clusterStatistics">>, [], undefined).
%% GET /_admin/cluster/health
clusterHealth(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?Get, <<"/_admin/cluster/health">>, [], undefined).
%% PUT /_admin/cluster/maintenance
clusterMaintenance(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?Put, <<"/_admin/cluster/maintenance">>, [], undefined).

Loading…
取消
儲存