add router handler option

This commit is contained in:
ginuerzh
2021-12-31 00:03:24 +08:00
parent a430384bba
commit 9769efe33c
35 changed files with 98 additions and 281 deletions

View File

@ -8,16 +8,13 @@ import (
type metadata struct {
readTimeout time.Duration
retryCount int
}
func (h *forwardHandler) parseMetadata(md mdata.Metadata) (err error) {
const (
readTimeout = "readTimeout"
retryCount = "retry"
)
h.md.readTimeout = mdata.GetDuration(md, readTimeout)
h.md.retryCount = mdata.GetInt(md, retryCount)
return
}