-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInterfaces.ts
157 lines (141 loc) · 3.6 KB
/
Interfaces.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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
import net = require('net');
import Player = require('./Player');
import enums = require('./enums');
import redis = require('redis');
export interface Settings {
httpServerPort: number;
httpsServerPort: number;
basicAuthUsername: string;
basicAuthPassword: string;
redis_port: number;
redis_address: string;
redis_password: string;
sslConfigPath: string;
motdFileLocation: string;
requestPaths: RequestPaths;
currentPatchlineFileLocation: string;
fallbackPatchline: string;
patchlines: string[];
MinimumSurplusCapacity: number;
SurplusRatio: number;
Graylog2: any;
redisLobbyInactiveTimeout: number;
LobbyListingsUpdateFrequency: number;
timeoutInMSForIsRunningCall: number;
refreshStatsIntervalInMS: number;
millisPerPixelForSmoothieChart: number;
MongoDBConnectionString: string;
timeoutForRequestPost: number;
redisRetryMaxDelay: number;
redisConnectTimeout: number;
queueURL: string;
elasticSearchURL1: string;
elasticSearchURL2: string;
graylogURL1: string;
graylogURL2: string;
mongoDbUsername: string;
mongoDbPassword: string;
mongoDbUris: Array<string>;
mongoDbReplicaSet: string;
mongoDbName: string;
mongoDbKeepAlive: number;
mongoDbReconnectTries: number;
mongoDbReconnectIntervalMillis: number;
save: ()=> Q.Promise<{}>;
}
export interface LobbyListing {
gameName: string;
mapName: string;
gameType: string;
numOfPlayers: number;
maxPlayers: number;
hostName: string;
gameGUID: string;
port: string;
}
export interface ProcessInfo {
settings: { mapName: string; gameType: string };
activePlayerCount: number;
gameGUID: string;
}
export interface Endpoint {
publicPort: number;
privatePort: number;
}
export interface PlatformStatusService {
motd: string;
patchline: string;
featureToggles: any;
}
export interface PlayerConnectedMessage {
player: Player;
gameGUID: string;
socket: net.Socket;
}
export interface MessagePlayers {
command: string;
players: Player[];
body: string;
next: Function;
}
export interface CommandLineAttributes {
privatePort: number;
mapName: string;
gameType: string;
gameGUID: string;
numOfPlayers: number;
processId: number;
}
export interface GameSettings {
mapName: string;
gameType: string;
}
export interface Job {
processInfo: ProcessInfo;
jobID: string;
endpoint?: Endpoint;
status: enums.JobState;
}
export interface AzureMachineData {
DeploymentName?: string;
ServiceName: string;
HostName: string;
AzureAccountName: string;
isStarting?: boolean;
isStabilized?: boolean;
}
export interface AzureServiceStatusData extends AzureMachineData {
instanceStatus: string;
powerState: string;
}
export interface Service {
serviceType: string;
url: string;
isRunning: boolean;
}
export interface RequestPaths {
gameServers: any;
lobbies: Array<string>;
lobbiesDb: Array<string>;
playerAccounts: Array<string>;
playerAccountsLoadBalanced: string;
playerAccountsDb: Array<string>;
chatServers: Array<string>;
playerStats: Array<string>;
playerStatsLoadBalanced: string;
rabbitMq: Array<string>;
graylog: Array<string>;
graylogLoadBalanced: string;
elasticSearch: Array<string>;
}
export interface PlatformStatus {
motd: string;
featureTogglesString: string;
}
export interface PlatformStatusDb {
init(): void;
createNewPlatformStatus(motd: string, featureTogglesString: string): Q.Promise<PlatformStatus>;
getPlatformStatus(): Q.Promise<PlatformStatus>;
setMotd(motd: string): Q.Promise<void>;
setFeatureTogglesString(featureTogglesString: string): Q.Promise<void>;
}