1.0.2 • Published 3 years ago
dtx-lib-clock-config v1.0.2
Purpose
Redis를 이용한 Clock-config으로 clock
해시테이블에 적재합니다.
Usage
const clockConfig = require('dtx-lib-clock-config');
const options = {
host: host,
port: 6379,
password: password
}
remoteConfig.init(options); // redis create client
remoteConfig.set('status', 'enabled'); // enabled, disabled
remoteConfig.set('mode', 'auto'); // auto, manual
remoteConfig.set('time_scale', 1); // 1: 1min == 1Day (ex. 5: 5min == 5Days)
remoteConfig.set('manualTime', '2021-10-15T00:00:00Z');
await remoteConfig.get('status');
await remoteConfig.get('mode');
await remoteConfig.get('time_scale');
await remoteConfig.get('manualTime');
clockConfig.end(); // redis client end