generated from bryopsida/node-ts-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.ts
98 lines (97 loc) · 1.97 KB
/
config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
import { MongoClientOptions } from 'mongodb'
/**
* Type of server, can be TCP or UDP
*/
export enum ServerTypeEnum {
// eslint-disable-next-line no-unused-vars
UDP = 'UDP',
// eslint-disable-next-line no-unused-vars
TCP = 'TCP',
}
/**
* Sub component configuration
*/
export interface ISubComponentConfig {
enabled: boolean
}
/**
* Archiver type
*/
export enum ArchiverType {
// eslint-disable-next-line no-unused-vars
MONGO = 'MONGO',
// eslint-disable-next-line no-unused-vars
SQLLITE3 = 'SQLLITE3',
// eslint-disable-next-line no-unused-vars
POUCHDB = 'POUCHDB',
}
/**
* Archiver configuration
*/
export interface IArchiverconfig extends ISubComponentConfig {
/**
* Type of archiver
*/
type: ArchiverType
/**
* Pass through options
*/
options?: MongoClientOptions
/**
* Hostname of system receiving messages for archival
*/
hostname?: string
/**
* Listening port of system receiving message for archival
*/
port?: number
/**
* username used for authentication to the archival system
*/
username?: string
/**
* password used for authentication to the archival system
*/
password?: string
/**
* Path to a file containing the username for authentication
*/
usernameFile?: string
/**
* Path to a file containing the password for authentication
*/
passwordFile?: string
/**
* Interval in milliseconds between syncs of local archival copy to a remote store
*/
syncInterval?: number
/**
* Database folder
*/
databaseFolder?: string
/**
* Protocol
*/
proto?: string
/**
* List of property keys on a log message to use for partitiong keys in priority listing, fist present will be used
*/
partitionKeyPriorityList?: string[]
}
/**
* System configuration
*/
export interface IConfig {
/**
* Server type
*/
serverType: ServerTypeEnum
/**
* Server listening port
*/
serverPort: number
/**
* Archiver configuration
*/
archiver: IArchiverconfig
}