2023-01-08 19:34:05 +08:00
|
|
|
package internal
|
|
|
|
|
2023-04-08 22:45:05 +08:00
|
|
|
import "github.com/zeromicro/go-zero/zrpc/internal/serverinterceptors"
|
2023-04-08 21:03:32 +08:00
|
|
|
|
2023-01-08 19:34:05 +08:00
|
|
|
type (
|
2023-04-08 22:45:05 +08:00
|
|
|
// StatConf defines the stat config.
|
|
|
|
StatConf = serverinterceptors.StatConf
|
|
|
|
|
2023-01-08 19:34:05 +08:00
|
|
|
// ClientMiddlewaresConf defines whether to use client middlewares.
|
|
|
|
ClientMiddlewaresConf struct {
|
|
|
|
Trace bool `json:",default=true"`
|
|
|
|
Duration bool `json:",default=true"`
|
|
|
|
Prometheus bool `json:",default=true"`
|
|
|
|
Breaker bool `json:",default=true"`
|
|
|
|
Timeout bool `json:",default=true"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// ServerMiddlewaresConf defines whether to use server middlewares.
|
|
|
|
ServerMiddlewaresConf struct {
|
2023-04-08 22:45:05 +08:00
|
|
|
Trace bool `json:",default=true"`
|
|
|
|
Recover bool `json:",default=true"`
|
|
|
|
Stat bool `json:",default=true"`
|
|
|
|
StatConf StatConf `json:",optional"`
|
|
|
|
Prometheus bool `json:",default=true"`
|
|
|
|
Breaker bool `json:",default=true"`
|
2023-01-08 19:34:05 +08:00
|
|
|
}
|
2023-10-25 21:01:57 +08:00
|
|
|
|
2023-10-26 08:55:26 +08:00
|
|
|
// MethodTimeoutConf defines specified timeout for gRPC methods.
|
|
|
|
MethodTimeoutConf = serverinterceptors.MethodTimeoutConf
|
2023-01-08 19:34:05 +08:00
|
|
|
)
|