diff options
author | Anders Svensson <[email protected]> | 2016-05-09 16:13:24 +0200 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2016-05-09 16:13:24 +0200 |
commit | f46d8a7f862a3f634b16c90426cb8601001c9de4 (patch) | |
tree | 2ddcec874fcd2fcab770f742b8b21ce12279cf37 /lib/diameter/src/base/diameter.erl | |
parent | a3f49cfc599bc3edda886cc6e895b442506ee6cc (diff) | |
parent | 18449b6bd35be4ad66ea7874a397029c8c920629 (diff) | |
download | otp-f46d8a7f862a3f634b16c90426cb8601001c9de4.tar.gz otp-f46d8a7f862a3f634b16c90426cb8601001c9de4.tar.bz2 otp-f46d8a7f862a3f634b16c90426cb8601001c9de4.zip |
Merge branch 'anders/diameter/info/OTP-13508'
* anders/diameter/info/OTP-13508:
Add diameter:peer_find/1
Add diameter:peer_info/1
Diffstat (limited to 'lib/diameter/src/base/diameter.erl')
-rw-r--r-- | lib/diameter/src/base/diameter.erl | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/lib/diameter/src/base/diameter.erl b/lib/diameter/src/base/diameter.erl index de88f6befd..e8f2f63f86 100644 --- a/lib/diameter/src/base/diameter.erl +++ b/lib/diameter/src/base/diameter.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2010-2015. All Rights Reserved. +%% Copyright Ericsson AB 2010-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -36,6 +36,8 @@ %% Information. -export([services/0, + peer_info/1, + peer_find/1, service_info/2]). %% Start/stop the application. In a "real" application this should @@ -53,6 +55,7 @@ service_name/0, capability/0, peer_filter/0, + peer_ref/0, service_opt/0, application_opt/0, app_module/0, @@ -147,6 +150,27 @@ service_info(SvcName, Option) -> diameter_service:info(SvcName, Option). %% --------------------------------------------------------------------------- +%% peer_info/2 +%% --------------------------------------------------------------------------- + +-spec peer_info(peer_ref()) + -> [tuple()]. + +peer_info(PeerRef) -> + diameter_service:peer_info(PeerRef). + +%% --------------------------------------------------------------------------- +%% peer_find/1 +%% --------------------------------------------------------------------------- + +-spec peer_find(peer_ref() | pid()) + -> {peer_ref(), pid()} + | false. + +peer_find(Pid) -> + diameter_peer_fsm:find(Pid). + +%% --------------------------------------------------------------------------- %% add_transport/3 %% --------------------------------------------------------------------------- @@ -280,6 +304,9 @@ call(SvcName, App, Message) -> | {all, [peer_filter()]} | {any, [peer_filter()]}. +-opaque peer_ref() + :: pid(). + -type evaluable() :: {module(), atom(), list()} | fun() |