feat: 路由策略新增第一个和最后一个
This commit is contained in:
parent
6974e1347d
commit
31bbe835f2
@ -112,7 +112,9 @@ export const routeKeyRecord: Record<Api.Common.RouteKey, App.I18n.I18nKey> = {
|
||||
1: 'common.routeKey.items.consistentHash',
|
||||
2: 'common.routeKey.items.random',
|
||||
3: 'common.routeKey.items.lru',
|
||||
4: 'common.routeKey.items.round'
|
||||
4: 'common.routeKey.items.round',
|
||||
5: 'common.routeKey.items.first',
|
||||
6: 'common.routeKey.items.last'
|
||||
};
|
||||
export const routeKeyRecordOptions = transformRecordToNumberOption(routeKeyRecord, true);
|
||||
|
||||
|
@ -107,7 +107,9 @@ const local: App.I18n.Schema = {
|
||||
consistentHash: 'Consistent hash',
|
||||
random: 'Random',
|
||||
lru: 'LRU',
|
||||
round: 'Round robin'
|
||||
round: 'Round robin',
|
||||
first: 'First',
|
||||
last: 'Last'
|
||||
}
|
||||
},
|
||||
blockStrategy: {
|
||||
|
@ -107,7 +107,9 @@ const local: App.I18n.Schema = {
|
||||
consistentHash: '一致性哈希',
|
||||
random: '随机',
|
||||
lru: 'LRU',
|
||||
round: '轮询'
|
||||
round: '轮询',
|
||||
first: '第一个',
|
||||
last: '最后一个'
|
||||
}
|
||||
},
|
||||
blockStrategy: {
|
||||
|
4
src/typings/api.d.ts
vendored
4
src/typings/api.d.ts
vendored
@ -70,8 +70,8 @@ declare namespace Api {
|
||||
status?: EnableStatus | null;
|
||||
} & T;
|
||||
|
||||
/** 1: 一致性Hash 2: 随机 3: LRU 4: 轮询 */
|
||||
type RouteKey = 1 | 2 | 3 | 4;
|
||||
/** 1: 一致性Hash 2: 随机 3: LRU 4: 轮询 5: 第一个 6: 最后一个 */
|
||||
type RouteKey = 1 | 2 | 3 | 4 | 5 | 6;
|
||||
|
||||
/** 阻塞策略 1:丢弃 2:覆盖 3:并行 4:恢复 */
|
||||
type BlockStrategy = 1 | 2 | 3 | 4;
|
||||
|
2
src/typings/app.d.ts
vendored
2
src/typings/app.d.ts
vendored
@ -387,6 +387,8 @@ declare namespace App {
|
||||
random: string;
|
||||
lru: string;
|
||||
round: string;
|
||||
first: string;
|
||||
last: string;
|
||||
};
|
||||
};
|
||||
blockStrategy: {
|
||||
|
Loading…
Reference in New Issue
Block a user