调整部分options

This commit is contained in:
Yun
2025-09-24 14:50:30 +08:00
parent 062a39b209
commit 0be8fd0cdc
7 changed files with 96 additions and 58 deletions
+2 -2
View File
@@ -32,14 +32,14 @@ func newOptions(opts ...Option) Options {
return o
}
func SetLogger(log logger.Logger) Option {
func WithLogger(log logger.Logger) Option {
return func(o *Options) {
o.logger = log
}
}
// 更新周期
func SetUpdateInterval(d time.Duration) Option {
func WithUpdateInterval(d time.Duration) Option {
if d.Abs() < time.Second {
d = time.Second * 5
}