-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: add config interface hooker
- Loading branch information
hui.wang
committed
Jan 20, 2022
1 parent
f653648
commit f00e718
Showing
2 changed files
with
38 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package xconf | ||
|
||
// AtomicSetterProvider Atomic设置配置的方法提供接口,配置层提供改方法供XConf自动设定最新配置 | ||
type AtomicSetterProvider interface { | ||
AtomicSetFunc() func(interface{}) | ||
} | ||
|
||
// GetOptionUsage 配置层提供改方法供XConf获取配置说明打印Usage | ||
type GetOptionUsage interface { | ||
GetOptionUsage() string | ||
} | ||
|
||
// XConfOptions 配置实现改接口,xconf会自动获取xconf配置覆盖默认设置 | ||
type XConfOptions interface { | ||
XConfOptions() []Option | ||
} |