refactor: SSE 连接增加 401/403 不重连、无 token 定时重试、流异常重连
This commit is contained in:
17
src/composables/sse/sseTopics.ts
Normal file
17
src/composables/sse/sseTopics.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
/** SSE 事件名常量,与后端 SseTopics.java 一一对应 */
|
||||
export const SseTopics = {
|
||||
/** 字典变更事件 */
|
||||
DICT: "dict",
|
||||
/** 在线用户数事件 */
|
||||
ONLINE_USERS: "online-users",
|
||||
/** 系统消息事件 */
|
||||
SYSTEM: "system",
|
||||
/** 心跳事件 */
|
||||
PING: "ping",
|
||||
/** 通知事件 */
|
||||
NOTICE: "notice",
|
||||
/** 通知撤回事件 */
|
||||
NOTICE_REVOKE: "notice-revoke",
|
||||
} as const;
|
||||
|
||||
export type SseTopic = (typeof SseTopics)[keyof typeof SseTopics];
|
||||
Reference in New Issue
Block a user