syndicate_utils/src/syndesizer.nim

39 lines
1001 B
Nim
Raw Normal View History

# 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
2024-01-10 08:16:42 +00:00
const
withPostgre* {.booldefine.}: bool = true
withSqlite* {.booldefine.}: bool = true
2024-01-10 08:16:42 +00:00
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,
webhooks,
websockets]
2024-01-10 08:16:42 +00:00
when withPostgre:
import ./syndesizer/postgre_actor
when withSqlite:
import ./syndesizer/sqlite_actor
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)
discard spawnJsonSocketTranslator(turn, root)
2024-01-08 20:10:55 +00:00
discard spawnJsonStdioTranslator(turn, root)
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)