You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
404 B
22 lines
404 B
package service |
|
|
|
import ( |
|
"context" |
|
"go-common/app/interface/openplatform/article/conf" |
|
) |
|
|
|
var _sentinel = &conf.Sentinel{ |
|
EnableSentinel: 1, |
|
DurationSample: 100, |
|
MonitorCountSample: 100, |
|
MonitorRateSample: 100, |
|
DebugSample: 100, |
|
} |
|
|
|
// Sentinel . |
|
func (s *Service) Sentinel(c context.Context) *conf.Sentinel { |
|
if s.c.Sentinel == nil { |
|
return _sentinel |
|
} |
|
return s.c.Sentinel |
|
}
|
|
|