Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FeatureOpts ¶
type FeatureOpts struct {
EnableMetrics bool `json:"enableMetrics,omitempty" yaml:"enableMetrics,omitempty"` // 开启 metrics 记录
}
func NewDefaultFeatureOpts ¶
func NewDefaultFeatureOpts() *FeatureOpts
type PathRewrite ¶
type PathRewrite struct {
// contains filtered or unexported fields
}
func NewPathRewrite ¶
func NewPathRewrite(rewriterConf *PathRewriteConfig, featureOpts *FeatureOpts) *PathRewrite
func (*PathRewrite) RewriteHandler ¶
func (r *PathRewrite) RewriteHandler() gin.HandlerFunc
func (*PathRewrite) Stop ¶
func (r *PathRewrite) Stop()
type PathRewriteConfig ¶
type PathRewriteConfig struct { PathRewriteFunc func(header *http.Request) (string, error) `json:"-" yaml:"-"` Logger *zap.SugaredLogger `json:"-" yaml:"-"` }
func NewDefaultPathRewriteConfig ¶
func NewDefaultPathRewriteConfig() *PathRewriteConfig
Click to show internal directories.
Click to hide internal directories.