diff options
author | Alex Auvolat <alex@adnab.me> | 2018-10-15 16:15:35 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2018-10-15 16:15:35 +0200 |
commit | 181baf7e0c26c51d7c605bc9797f77ced9188455 (patch) | |
tree | b8520b756c25df1648006f9390d51974b94ea9c1 /shard/lib/app/identity.ex | |
parent | 8c49dd71d29359447c24b1cd4f48a8faf0c4fdca (diff) | |
download | shard-181baf7e0c26c51d7c605bc9797f77ced9188455.tar.gz shard-181baf7e0c26c51d7c605bc9797f77ced9188455.zip |
Basic infrastructure for dependency between shards
Diffstat (limited to 'shard/lib/app/identity.ex')
-rw-r--r-- | shard/lib/app/identity.ex | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/shard/lib/app/identity.ex b/shard/lib/app/identity.ex index bacfdab..b034107 100644 --- a/shard/lib/app/identity.ex +++ b/shard/lib/app/identity.ex @@ -78,6 +78,14 @@ defmodule SApp.Identity do end end + def handle_cast(:send_deps, state) do + default_deps = [ + %SApp.Directory.Manifest{owner: state.pk, public: false, name: "friends"} + ] + GenServer.cast(Shard.Manager, {:dep_list, state.id, default_deps}) + {:noreply, state} + end + def handle_cast({:peer_connected, peer_pid}, state) do GenServer.cast(peer_pid, {:send_msg, {:interested, [state.id]}}) {:noreply, state} |