mirror of
https://github.com/oarkflow/mq.git
synced 2025-10-05 16:06:55 +08:00
update
This commit is contained in:
36
options.go
36
options.go
@@ -314,3 +314,39 @@ func WithConsumerTimeout(timeout time.Duration) Option {
|
||||
opts.consumerTimeout = timeout
|
||||
}
|
||||
}
|
||||
|
||||
func WithAdminAddr(addr string) Option {
|
||||
return func(opts *Options) {
|
||||
opts.adminAddr = addr
|
||||
}
|
||||
}
|
||||
|
||||
func WithMetricsAddr(addr string) Option {
|
||||
return func(opts *Options) {
|
||||
opts.metricsAddr = addr
|
||||
}
|
||||
}
|
||||
|
||||
func WithSecurity(enabled bool) Option {
|
||||
return func(opts *Options) {
|
||||
opts.enableSecurity = enabled
|
||||
}
|
||||
}
|
||||
|
||||
func WithMonitoring(enabled bool) Option {
|
||||
return func(opts *Options) {
|
||||
opts.enableMonitoring = enabled
|
||||
}
|
||||
}
|
||||
|
||||
func WithUsername(username string) Option {
|
||||
return func(opts *Options) {
|
||||
opts.username = username
|
||||
}
|
||||
}
|
||||
|
||||
func WithPassword(password string) Option {
|
||||
return func(opts *Options) {
|
||||
opts.password = password
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user