mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-01-24 01:30:25 +08:00
842c4d81cc
Co-authored-by: hanzijian <hanzijian@52tt.com> Co-authored-by: Kevin Wan <wanjunfeng@gmail.com>
30 lines
935 B
Go
30 lines
935 B
Go
package internal
|
|
|
|
import "github.com/zeromicro/go-zero/zrpc/internal/serverinterceptors"
|
|
|
|
type (
|
|
// StatConf defines the stat config.
|
|
StatConf = serverinterceptors.StatConf
|
|
|
|
// 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 {
|
|
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"`
|
|
}
|
|
|
|
ServerSpecifiedTimeoutConf = serverinterceptors.ServerSpecifiedTimeoutConf
|
|
)
|