diff options
author | Diego Magdaleno <diegomagdaleno@protonmail.com> | 2021-07-29 09:56:00 -0500 |
---|---|---|
committer | Diego Magdaleno <diegomagdaleno@protonmail.com> | 2021-07-29 09:56:00 -0500 |
commit | b96bed64a3a69da1178ca6e0e74df0152883b800 (patch) | |
tree | 0c27b8f436795d845d37bd08851f762e2ccc97ab /src | |
parent | Merge pull request #10 from luth31/master (diff) | |
download | server-b96bed64a3a69da1178ca6e0e74df0152883b800.tar.xz |
[Config] Handle kafka
Diffstat (limited to 'src')
-rw-r--r-- | src/util/Config.ts | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/util/Config.ts b/src/util/Config.ts index 6af351b3..f2463186 100644 --- a/src/util/Config.ts +++ b/src/util/Config.ts @@ -33,6 +33,11 @@ export interface Region { optimal: boolean, } +export interface KafkaBroker { + ip: string, + port: number +} + export interface DefaultOptions { gateway: { endpoint: string | null; @@ -129,6 +134,9 @@ export interface DefaultOptions { default: string; available: Region[]; } + kafka: { + brokers: KafkaBroker[] + } } export const DefaultOptions: DefaultOptions = { @@ -222,14 +230,19 @@ export const DefaultOptions: DefaultOptions = { }, regions: { default: "fosscord", - available: [ + available: [ { id: "fosscord", name: "Fosscord", vip: false, custom: false, deprecated: false, optimal: false }, ] }, + kafka: { + brokers: [ + { ip: "localhost", port: 9092 } + ] + } }; export const ConfigSchema = new Schema({}, { strict: false }); -export interface DefaultOptionsDocument extends DefaultOptions, Document {} +export interface DefaultOptionsDocument extends DefaultOptions, Document { } export const ConfigModel = model<DefaultOptionsDocument>("Config", ConfigSchema, "config"); |