|
8 | 8 | [mercurius.core.domain.use-cases.mediator.middleware.stm :refer [stm]]
|
9 | 9 | [mercurius.core.domain.messaging.event-bus :refer [emit]]
|
10 | 10 | [mercurius.core.adapters.messaging.pub-sub-event-bus :refer [new-pub-sub-event-bus]]
|
11 |
| - [mercurius.core.infraestructure.messaging.channel-based-pub-sub :refer [start-channel-based-pub-sub stop-channel-based-pub-sub]] |
| 11 | + [mercurius.core.infrastructure.messaging.channel-based-pub-sub :refer [start-channel-based-pub-sub stop-channel-based-pub-sub]] |
12 | 12 | [mercurius.core.adapters.processes.activity-logger :refer [new-activity-logger]]
|
13 | 13 | [mercurius.core.adapters.controllers.use-case-controller :refer [new-use-case-controller]]
|
14 | 14 | [mercurius.core.adapters.controllers.event-notifier :refer [start-event-notifier]]
|
15 |
| - [mercurius.core.infraestructure.web.server :refer [start-web-server stop-web-server]] |
16 |
| - [mercurius.core.infraestructure.web.sente :refer [start-sente stop-sente]] |
| 15 | + [mercurius.core.infrastructure.web.server :refer [start-web-server stop-web-server]] |
| 16 | + [mercurius.core.infrastructure.web.sente :refer [start-sente stop-sente]] |
17 | 17 | [mercurius.accounts.domain.use-cases.authenticate :refer [new-authenticate-use-case]]
|
18 | 18 | [mercurius.accounts.adapters.repositories.in-memory-user-repository :refer [new-in-memory-user-repo]]
|
19 | 19 | [mercurius.wallets.adapters.repositories.in-memory-wallet-repository :refer [new-in-memory-wallet-repo]]
|
|
85 | 85 | :adapters/ticker-repo nil
|
86 | 86 | :adapters/trade-repo nil
|
87 | 87 | :adapters/user-repo nil
|
88 |
| - :adapters/event-bus {:pub-sub (ig/ref :infraestructure/pub-sub)} |
| 88 | + :adapters/event-bus {:pub-sub (ig/ref :infrastructure/pub-sub)} |
89 | 89 | :processes/trade-finder {:event-bus (ig/ref :adapters/event-bus)
|
90 | 90 | :dispatch (ig/ref :use-cases/dispatch)}
|
91 | 91 | :processes/trade-processor {:event-bus (ig/ref :adapters/event-bus)
|
92 | 92 | :dispatch (ig/ref :use-cases/dispatch)}
|
93 | 93 | :processes/activity-logger {:event-bus (ig/ref :adapters/event-bus)}
|
94 | 94 | :processes/simulator {:dispatch (ig/ref :use-cases/dispatch)
|
95 |
| - :pub-sub (ig/ref :infraestructure/pub-sub)} |
| 95 | + :pub-sub (ig/ref :infrastructure/pub-sub)} |
96 | 96 | :controllers/use-case-controller {:dispatch (ig/ref :use-cases/dispatch)}
|
97 | 97 | :controllers/simulation-controller {:simulator (ig/ref :processes/simulator)}
|
98 | 98 | :controllers/event-notifier {:event-bus (ig/ref :adapters/event-bus)
|
99 |
| - :pub-sub (ig/ref :infraestructure/pub-sub)} |
100 |
| - :infraestructure/pub-sub nil |
101 |
| - :infraestructure/web-server {:port port |
102 |
| - :session-key session-key |
103 |
| - :sente (ig/ref :infraestructure/sente) |
104 |
| - :dispatch (ig/ref :use-cases/dispatch)} |
105 |
| - :infraestructure/sente {:use-case-controller (ig/ref :controllers/use-case-controller) |
106 |
| - :simulation-controller (ig/ref :controllers/simulation-controller) |
107 |
| - :pub-sub (ig/ref :infraestructure/pub-sub)}}) |
| 99 | + :pub-sub (ig/ref :infrastructure/pub-sub)} |
| 100 | + :infrastructure/pub-sub nil |
| 101 | + :infrastructure/web-server {:port port |
| 102 | + :session-key session-key |
| 103 | + :sente (ig/ref :infrastructure/sente) |
| 104 | + :dispatch (ig/ref :use-cases/dispatch)} |
| 105 | + :infrastructure/sente {:use-case-controller (ig/ref :controllers/use-case-controller) |
| 106 | + :simulation-controller (ig/ref :controllers/simulation-controller) |
| 107 | + :pub-sub (ig/ref :infrastructure/pub-sub)}}) |
108 | 108 |
|
109 | 109 | (defmethod ig/init-key :adapters/wallet-repo [_ _]
|
110 | 110 | (new-in-memory-wallet-repo))
|
|
121 | 121 | (defmethod ig/init-key :adapters/user-repo [_ _]
|
122 | 122 | (new-in-memory-user-repo))
|
123 | 123 |
|
124 |
| -(defmethod ig/init-key :infraestructure/pub-sub [_ _] |
| 124 | +(defmethod ig/init-key :infrastructure/pub-sub [_ _] |
125 | 125 | (start-channel-based-pub-sub))
|
126 | 126 |
|
127 |
| -(defmethod ig/halt-key! :infraestructure/pub-sub [_ pub-sub] |
| 127 | +(defmethod ig/halt-key! :infrastructure/pub-sub [_ pub-sub] |
128 | 128 | (stop-channel-based-pub-sub pub-sub))
|
129 | 129 |
|
130 | 130 | (defmethod ig/init-key :adapters/event-bus [_ deps]
|
|
209 | 209 | (defmethod ig/halt-key! :processes/simulator [_ simulator]
|
210 | 210 | (stop-simulator simulator))
|
211 | 211 |
|
212 |
| -(defmethod ig/init-key :infraestructure/web-server [_ deps] |
| 212 | +(defmethod ig/init-key :infrastructure/web-server [_ deps] |
213 | 213 | (start-web-server deps))
|
214 | 214 |
|
215 |
| -(defmethod ig/halt-key! :infraestructure/web-server [_ server] |
| 215 | +(defmethod ig/halt-key! :infrastructure/web-server [_ server] |
216 | 216 | (stop-web-server server))
|
217 | 217 |
|
218 | 218 | (defmethod ig/init-key :controllers/use-case-controller [_ deps]
|
|
224 | 224 | (defmethod ig/init-key :controllers/event-notifier [_ deps]
|
225 | 225 | (start-event-notifier deps))
|
226 | 226 |
|
227 |
| -(defmethod ig/init-key :infraestructure/sente [_ deps] |
| 227 | +(defmethod ig/init-key :infrastructure/sente [_ deps] |
228 | 228 | (start-sente deps))
|
229 | 229 |
|
230 |
| -(defmethod ig/halt-key! :infraestructure/sente [_ sente] |
| 230 | +(defmethod ig/halt-key! :infrastructure/sente [_ sente] |
231 | 231 | (stop-sente sente))
|
232 | 232 |
|
233 | 233 | (defn start
|
|
0 commit comments