forked from zeromicro/go-zero
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.go
27 lines (23 loc) · 858 Bytes
/
config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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"`
}
)