From 4efa1b36b2d08c979bf7d5856233dd8e9c8efeb3 Mon Sep 17 00:00:00 2001 From: LeiHua Date: Fri, 13 Jan 2023 14:10:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0erlang=E8=AF=AD=E8=A8=80xdb?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=AE=A2=E6=88=B7=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- binding/erlang/README.md | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/binding/erlang/README.md b/binding/erlang/README.md index 8b35fd3..8cf070a 100644 --- a/binding/erlang/README.md +++ b/binding/erlang/README.md @@ -1,9 +1,24 @@ -ip2region -===== +# ip2region xdb erlang 查询客户端 -An OTP application -Build ------ +### 编译 - $ rebar3 compile +``` +$ rebar3 compile +``` +### 运行 +启动erlang节点: +``` +$ rebar3 shell + +``` +在erlang节点中执行以下指令查询Ip地址信息: +``` +1> ip2region:search("1.0.8.0"). +#{city => <<229,185,191,229,183,158,229,184,130>>, + country => <<228,184,173,229,155,189>>, + isp => <<231,148,181,228,191,161>>, + province => <<229,185,191,228,184,156,231,156,129>>, + region => <<>>} +2> +```