refactor(zrpc): prefer static config for zrpc server statinterceptor (#3105)
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package internal
|
||||
|
||||
import "time"
|
||||
|
||||
type (
|
||||
// ClientMiddlewaresConf defines whether to use client middlewares.
|
||||
ClientMiddlewaresConf struct {
|
||||
@@ -12,10 +14,12 @@ type (
|
||||
|
||||
// ServerMiddlewaresConf defines whether to use server middlewares.
|
||||
ServerMiddlewaresConf struct {
|
||||
Trace bool `json:",default=true"`
|
||||
Recover bool `json:",default=true"`
|
||||
Stat bool `json:",default=true"`
|
||||
Prometheus bool `json:",default=true"`
|
||||
Breaker bool `json:",default=true"`
|
||||
Trace bool `json:",default=true"`
|
||||
Recover bool `json:",default=true"`
|
||||
Stat bool `json:",default=true"`
|
||||
StatSlowThreshold time.Duration `json:",default=500ms"`
|
||||
NotLoggingContentMethods []string `json:",optional"`
|
||||
Prometheus bool `json:",default=true"`
|
||||
Breaker bool `json:",default=true"`
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user