feat(sdk): 批量传输(批量/退避/信标/丢包计数)

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
浅念
2026-09-15 16:07:18 +08:00
parent 18537c5dba
commit 6be163a329
3 changed files with 293 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
export interface CtkConfig {
siteId: string;
endpoint: string;
batchSize?: number;
flushMs?: number;
maxRetry?: number;
queueMax?: number;
}
export function mergeConfig(opts: CtkConfig): Required<CtkConfig> {
return { batchSize: 10, flushMs: 15000, maxRetry: 3, queueMax: 200, ...opts };
}