-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathcatcher.js
33 lines (27 loc) · 1.02 KB
/
catcher.js
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
import { Detections } from './common/collections/detections.js';
import { SIMReadings } from './common/collections/sim-readings.js';
import { NeighborReadings } from './common/collections/neighbor-readings.js';
import { TelephonyReadings } from './common/collections/telephony-readings.js';
import { READING_TYPES, READING_TYPES_ARR } from './common/lib/reading-types.js';
import {
getThreatScore,
inDanger
} from './common/lib/detection-helpers.js';
export const Catcher = {
READING_TYPES: READING_TYPES,
READING_TYPES_ARR: READING_TYPES_ARR,
// Collections
Detections: Detections,
SIMReadings: SIMReadings,
NeighborReadings: NeighborReadings,
TelephonyReadings: TelephonyReadings,
// Detection helpers
getThreatScore: getThreatScore,
inDanger: inDanger,
// Some "servers" may collect readings and store to DB
// to avoid duplicate detections, basestations, etc,
// only one server should process readings and generate detections.
isMasterServer() {
return Meteor.settings.IS_MASTER_SERVER === true
}
};