Skip to content

Commit

Permalink
Merge 3471613 into 1a8743b
Browse files Browse the repository at this point in the history
  • Loading branch information
surik committed Sep 16, 2016
2 parents 1a8743b + 3471613 commit 21e4531
Showing 1 changed file with 26 additions and 30 deletions.
56 changes: 26 additions & 30 deletions lib/hello.ex
Original file line number Diff line number Diff line change
@@ -1,40 +1,36 @@
defmodule Hello do
defdelegate [
start_listener(uri),
start_listener(uri, trans_opts),
start_listener(uri, trans_opts, protocol, proto_opts, router_mod),
start_listener(name, uri, trans_opts, protocol, proto_opts, router_mod),

stop_listener(uri),

call_service(name, request),
call_service(name, identifier, request),

bind_handler(uri, callback_mod, callback_args),
bind(uri, handler_mod),
bind(uri, handler_mod, handler_args),
unbind(uri, handler_mod)
], to: :hello
defdelegate start_listener(uri), to: :hello
defdelegate start_listener(uri, trans_opts), to: :hello
defdelegate start_listener(uri, trans_opts, protocol, proto_opts, router_mod), to: :hello
defdelegate start_listener(name, uri, trans_opts, protocol, proto_opts, router_mod), to: :hello

defdelegate stop_listener(uri), to: :hello

defdelegate call_service(name, request), to: :hello
defdelegate call_service(name, identifier, request), to: :hello

defdelegate bind_handler(uri, callback_mod, callback_args), to: :hello
defdelegate bind(uri, handler_mod), to: :hello
defdelegate bind(uri, handler_mod, handler_args), to: :hello
defdelegate unbind(uri, handler_mod), to: :hello
end

defmodule Hello.Client do
defdelegate [
start_link(uri, opts),
start_link(name, uri, opts),
start_link(uri, trans_opts, proto_opts, client_opts),
start_link(name, uri, trans_opts, proto_opts, client_opts),
defdelegate start_link(uri, opts), to: :hello_client
defdelegate start_link(name, uri, opts), to: :hello_client
defdelegate start_link(uri, trans_opts, proto_opts, client_opts), to: :hello_client
defdelegate start_link(name, uri, trans_opts, proto_opts, client_opts),to: :hello_client

start(uri, trans_opts, proto_opts, client_opts),
start(name, uri, trans_opts, proto_opts, client_opts),
defdelegate start(uri, trans_opts, proto_opts, client_opts), to: :hello_client
defdelegate start(name, uri, trans_opts, proto_opts, client_opts), to: :hello_client

stop(client),
defdelegate stop(client),to: :hello_client

start_supervised(uri, trans_opts, proto_opts, client_opts),
start_supervised(name, uri, trans_opts, proto_opts, client_opts),
defdelegate start_supervised(uri, trans_opts, proto_opts, client_opts), to: :hello_client
defdelegate start_supervised(name, uri, trans_opts, proto_opts, client_opts), to: :hello_client

stop_supervised(client),
defdelegate stop_supervised(client), to: :hello_client

call(client, call),
call(client, call, timeout)
], to: :hello_client
defdelegate call(client, call), to: :hello_client
defdelegate call(client, call, timeout), to: :hello_client
end

0 comments on commit 21e4531

Please sign in to comment.