feat: add middlewares config for zrpc (#2766)
* feat: add middlewares config for zrpc * chore: add tests * chore: improve codecov * chore: improve codecov
This commit is contained in:
21
zrpc/internal/config.go
Normal file
21
zrpc/internal/config.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package internal
|
||||
|
||||
type (
|
||||
// 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"`
|
||||
Prometheus bool `json:",default=true"`
|
||||
Breaker bool `json:",default=true"`
|
||||
}
|
||||
)
|
||||
Reference in New Issue
Block a user