config.go 901 B

12345678910111213141516171819202122232425
  1. package internal
  2. import "time"
  3. type (
  4. // ClientMiddlewaresConf defines whether to use client middlewares.
  5. ClientMiddlewaresConf struct {
  6. Trace bool `json:",default=true"`
  7. Duration bool `json:",default=true"`
  8. Prometheus bool `json:",default=true"`
  9. Breaker bool `json:",default=true"`
  10. Timeout bool `json:",default=true"`
  11. }
  12. // ServerMiddlewaresConf defines whether to use server middlewares.
  13. ServerMiddlewaresConf struct {
  14. Trace bool `json:",default=true"`
  15. Recover bool `json:",default=true"`
  16. Stat bool `json:",default=true"`
  17. StatSlowThreshold time.Duration `json:",default=500ms"`
  18. NotLoggingContentMethods []string `json:",optional"`
  19. Prometheus bool `json:",default=true"`
  20. Breaker bool `json:",default=true"`
  21. }
  22. )