sentinel.go 404 B

12345678910111213141516171819202122
  1. package service
  2. import (
  3. "context"
  4. "go-common/app/interface/openplatform/article/conf"
  5. )
  6. var _sentinel = &conf.Sentinel{
  7. EnableSentinel: 1,
  8. DurationSample: 100,
  9. MonitorCountSample: 100,
  10. MonitorRateSample: 100,
  11. DebugSample: 100,
  12. }
  13. // Sentinel .
  14. func (s *Service) Sentinel(c context.Context) *conf.Sentinel {
  15. if s.c.Sentinel == nil {
  16. return _sentinel
  17. }
  18. return s.c.Sentinel
  19. }