forked from cult-of-coders/redis-oplog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
redis-oplog.js
39 lines (34 loc) · 985 Bytes
/
redis-oplog.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
34
35
36
37
38
39
import './lib/mongo//mongoCollectionNames';
import { RedisPipe, Events } from './lib/constants';
import { Meteor } from 'meteor/meteor';
import init from './lib/init';
import Config from './lib/config';
import { getRedisListener, getRedisPusher } from './lib/redis/getRedisClient';
import SyntheticMutator from './lib/mongo/SyntheticMutator';
import ObservableCollection from './lib/cache/ObservableCollection';
import Vent from './lib/vent/Vent';
const RedisOplog = {
init,
};
// Warnings
Meteor.startup(function() {
if (Package['insecure']) {
console.log('RedisOplog does not support the insecure package.');
}
});
export {
RedisOplog,
SyntheticMutator,
ObservableCollection,
RedisPipe,
Config,
Events,
Vent,
getRedisListener,
getRedisPusher,
};
if (process.env.REDIS_OPLOG_SETTINGS) {
init(JSON.parse(process.env.REDIS_OPLOG_SETTINGS));
} else if (Meteor.settings.redisOplog) {
init(Meteor.settings.redisOplog);
}