2023-12-14 19:38:44 +00:00
|
|
|
# SPDX-FileCopyrightText: ☭ Emery Hemingway
|
|
|
|
# SPDX-License-Identifier: Unlicense
|
|
|
|
|
|
|
|
## Syndicate multitool.
|
|
|
|
|
2024-01-08 18:47:37 +00:00
|
|
|
import syndicate, syndicate/relays, syndicate/actors/timers
|
2023-12-14 19:38:44 +00:00
|
|
|
|
2024-01-10 08:16:42 +00:00
|
|
|
const
|
|
|
|
withPostgre* {.booldefine.}: bool = true
|
|
|
|
|
2024-01-08 19:42:46 +00:00
|
|
|
import ./syndesizer/[
|
2024-01-09 11:21:30 +00:00
|
|
|
cache_actor,
|
2024-01-09 18:49:54 +00:00
|
|
|
file_system_usage,
|
2024-01-09 11:21:30 +00:00
|
|
|
json_socket_translator,
|
|
|
|
json_translator,
|
|
|
|
sqlite_actor,
|
|
|
|
webhooks,
|
|
|
|
websockets]
|
2023-12-14 19:38:44 +00:00
|
|
|
|
2024-01-10 08:16:42 +00:00
|
|
|
when withPostgre:
|
|
|
|
import ./syndesizer/postgre_actor
|
|
|
|
|
2023-12-14 19:38:44 +00:00
|
|
|
runActor("syndesizer") do (turn: var Turn; root: Cap):
|
|
|
|
connectStdio(turn, root)
|
2024-01-08 18:47:37 +00:00
|
|
|
discard spawnTimers(turn, root)
|
2024-01-08 19:42:46 +00:00
|
|
|
discard spawnCacheActor(turn, root)
|
2024-01-09 18:49:54 +00:00
|
|
|
discard spawnFileSystemUsageActor(turn, root)
|
2024-01-08 19:14:33 +00:00
|
|
|
discard spawnJsonSocketTranslator(turn, root)
|
2024-01-08 20:10:55 +00:00
|
|
|
discard spawnJsonStdioTranslator(turn, root)
|
2024-01-08 18:48:04 +00:00
|
|
|
discard spawnWebhookActor(turn, root)
|
2024-01-09 09:35:19 +00:00
|
|
|
discard spawnWebsocketActor(turn, root)
|
2024-01-10 08:16:42 +00:00
|
|
|
when withPostgre:
|
|
|
|
discard spawnPostgreActor(turn, root)
|
2024-01-09 11:21:30 +00:00
|
|
|
when withSqlite:
|
|
|
|
discard spawnSqliteActor(turn, root)
|