(config: TrackerConfig)
| 26 | private timer: NodeJS.Timeout | null = null; |
| 27 | |
| 28 | constructor(config: TrackerConfig) { |
| 29 | this.endpoint = config.endpoint; |
| 30 | this.version = config.version; |
| 31 | this.syncInterval = config.syncInterval || 10 * 60 * 1000; |
| 32 | this.threshold = config.threshold || 50; |
| 33 | this.buffer = new Map<string, number>(); |
| 34 | |
| 35 | this.init(); |
| 36 | } |
| 37 | |
| 38 | private init(): void { |
| 39 | // 启动定时任务 |