Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

74 Zeilen
1.1 KiB

vor 5 Jahren
  1. -module(agHttpCli_app).
  2. -include("buoy_internal.hrl").
  3. -export([
  4. start/0,
  5. stop/0
  6. ]).
  7. -behaviour(application).
  8. -export([
  9. start/2,
  10. stop/1
  11. ]).
  12. %% public
  13. -spec start() ->
  14. {ok, [atom()]}.
  15. start() ->
  16. application:ensure_all_started(?APP).
  17. -spec stop() ->
  18. ok | {error, {not_started, ?APP}}.
  19. stop() ->
  20. application:stop(?APP).
  21. %% application callbacks
  22. -spec start(application:start_type(), term()) ->
  23. {ok, pid()}.
  24. start(_StartType, _StartArgs) ->
  25. agHttpCli_sup:start_link().
  26. -spec stop(term()) ->
  27. ok.
  28. stop(_State) ->
  29. agAgencyPoolMgr:terminate(),
  30. ok.
  31. -behaviour(application).
  32. -export([
  33. start/2,
  34. stop/1
  35. ]).
  36. %% public
  37. -spec start() ->
  38. {ok, [atom()]} | {error, term()}.
  39. start() ->
  40. application:ensure_all_started(?APP).
  41. -spec stop() ->
  42. ok | {error, term()}.
  43. stop() ->
  44. application:stop(?APP).
  45. %% application callbacks
  46. -spec start(application:start_type(), term()) ->
  47. {ok, pid()}.
  48. start(_StartType, _StartArgs) ->
  49. shackle_sup:start_link().
  50. -spec stop(term()) ->
  51. ok.
  52. stop(_State) ->
  53. agAgencyPoolMgr:terminate(),
  54. ok.