Skip to content

Commit da4ce0e

Browse files
committed
[增加](设置): 增加雪花ID的配置参数
1 parent 9fd5429 commit da4ce0e

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

GameFrameX.StartUp/Options/LauncherOptions.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,12 @@ public sealed class LauncherOptions
223223
[GrafanaLokiLabelTag]
224224
public ushort OuterPort { get; set; }
225225

226+
/// <summary>
227+
/// 雪花ID的工作ID
228+
/// </summary>
229+
[Option(nameof(WorkerId), Default = 0, HelpText = "雪花ID的工作ID,默认为0,表示自动分配")]
230+
public ushort WorkerId { get; set; }
231+
226232
/// <summary>
227233
/// API接口根路径,必须以/开头和以/结尾,默认为[/game/api/]
228234
/// </summary>

GameFrameX.Utility/Setting/AppSetting.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,11 @@ public string ToFormatString()
238238
/// </summary>
239239
public ushort InnerPort { get; set; }
240240

241+
/// <summary>
242+
/// 雪花ID的工作ID
243+
/// </summary>
244+
public ushort WorkerId { get; set; }
245+
241246
/// <summary>
242247
/// 外部IP地址
243248
/// </summary>

0 commit comments

Comments
 (0)