in cmd/go-runner/plugins/limit_req.go [55:66]
func (p *LimitReq) ParseConf(in []byte) (interface{}, error) {
conf := LimitReqConf{}
err := json.Unmarshal(in, &conf)
if err != nil {
return nil, err
}
limiter := rate.NewLimiter(rate.Limit(conf.Rate), conf.Burst)
// the conf can be used to store route scope data
conf.limiter = limiter
return conf, nil
}