修改集群模式使用封装的方法

This commit is contained in:
Yun
2025-10-04 20:44:16 +08:00
parent 81ce4f67d3
commit 14eb90bf7d
8 changed files with 136 additions and 218 deletions
+7
View File
@@ -10,6 +10,7 @@ type Options struct {
logger logger.Logger
instanceId string
priority *priority.Priority // 全局优先级
source string // 来源服务
}
func defaultOptions() Options {
@@ -49,3 +50,9 @@ func WithInstanceId(instanceId string) Option {
o.instanceId = instanceId
}
}
func WithSource(source string) Option {
return func(o *Options) {
o.source = source
}
}