Loadpoint: add enable/disable delay apis (#16396)
This commit is contained in:
parent
67e5927078
commit
37d1f5861f
10 changed files with 145 additions and 12 deletions
|
|
@ -162,6 +162,11 @@ func boolGetHandler(get func() bool) http.HandlerFunc {
|
|||
}
|
||||
}
|
||||
|
||||
// durationHandler updates duration-param api
|
||||
func durationHandler(set func(time.Duration) error, get func() time.Duration) http.HandlerFunc {
|
||||
return handler(util.ParseDuration, set, get)
|
||||
}
|
||||
|
||||
// updateSmartCostLimit sets the smart cost limit globally
|
||||
func updateSmartCostLimit(site site.API) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue