MCPcopy Create free account
hub / github.com/ZToolsCenter/ZTools / init

Method init

src/main/api/renderer/sync.ts:16–27  ·  view source on GitHub ↗
(mainWindow?: BrowserWindow)

Source from the content-addressed store, hash-verified

14 private syncEngine: SyncEngine | null = null
15
16 public init(mainWindow?: BrowserWindow): void {
17 this.syncEngine = new SyncEngine(lmdbInstance)
18 if (mainWindow) {
19 this.syncEngine.setMainWindow(mainWindow)
20 }
21 this.setupIPC()
22
23 // 应用启动时初始化同步引擎
24 this.syncEngine.init().catch((error) => {
25 console.error('[Sync API] 初始化失败:', error)
26 })
27 }
28
29 private setupIPC(): void {
30 // 测试 WebDAV 连接

Callers 1

setupIPCMethod · 0.45

Calls 2

setupIPCMethod · 0.95
setMainWindowMethod · 0.80

Tested by

no test coverage detected