[Config] Handle kafka
This commit is contained in:
parent
e0acff92c1
commit
b96bed64a3
@ -33,6 +33,11 @@ export interface Region {
|
|||||||
optimal: boolean,
|
optimal: boolean,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface KafkaBroker {
|
||||||
|
ip: string,
|
||||||
|
port: number
|
||||||
|
}
|
||||||
|
|
||||||
export interface DefaultOptions {
|
export interface DefaultOptions {
|
||||||
gateway: {
|
gateway: {
|
||||||
endpoint: string | null;
|
endpoint: string | null;
|
||||||
@ -129,6 +134,9 @@ export interface DefaultOptions {
|
|||||||
default: string;
|
default: string;
|
||||||
available: Region[];
|
available: Region[];
|
||||||
}
|
}
|
||||||
|
kafka: {
|
||||||
|
brokers: KafkaBroker[]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const DefaultOptions: DefaultOptions = {
|
export const DefaultOptions: DefaultOptions = {
|
||||||
@ -222,14 +230,19 @@ export const DefaultOptions: DefaultOptions = {
|
|||||||
},
|
},
|
||||||
regions: {
|
regions: {
|
||||||
default: "fosscord",
|
default: "fosscord",
|
||||||
available: [
|
available: [
|
||||||
{ id: "fosscord", name: "Fosscord", vip: false, custom: false, deprecated: false, optimal: false },
|
{ 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 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");
|
export const ConfigModel = model<DefaultOptionsDocument>("Config", ConfigSchema, "config");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user