aboutsummaryrefslogtreecommitdiff
path: root/shard/lib/manager.ex
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2018-10-11 14:22:00 +0200
committerAlex Auvolat <alex@adnab.me>2018-10-11 14:22:00 +0200
commiteb8c949551ffb8b3600357d7ff2bebe750af96e5 (patch)
tree36a0b46219ae595313b569c5885c470a0ddaca0e /shard/lib/manager.ex
parent7b6042205e7c6135fae4e0d21dbf7a5975e8491b (diff)
downloadshard-eb8c949551ffb8b3600357d7ff2bebe750af96e5.tar.gz
shard-eb8c949551ffb8b3600357d7ff2bebe750af96e5.zip
Address, broadcast group management
Diffstat (limited to 'shard/lib/manager.ex')
-rw-r--r--shard/lib/manager.ex4
1 files changed, 4 insertions, 0 deletions
diff --git a/shard/lib/manager.ex b/shard/lib/manager.ex
index 08e14c7..1e089ba 100644
--- a/shard/lib/manager.ex
+++ b/shard/lib/manager.ex
@@ -315,4 +315,8 @@ defmodule Shard.Manager do
def list_connections() do
for [x] <- :ets.match(:connections, :"$1"), do: x
end
+
+ def get_connections_to(peer_info) do
+ for {^peer_info, pid, auth} <- :ets.lookup(:connections, peer_info), do: {pid, auth}
+ end
end