mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-30 07:59:40 -08:00
eba01d1119
Due to on going issues, we've decided to remove gorest. It started with gorest not being thread-safe (it does introspection to create a new handler which is an easy process to mess up with multiple threads of execution): https://code.google.com/p/gorest/issues/detail?id=15 While the issue has been marked fixed, it looks like the patch has introduced more problems than the original issue and simply doesn't work properly. I'm not sure the behaviour was thought through properly. If a new instance is needed every request then a handler-factory is needed or the library needs to set expectations about how the new objects should interact with their constructor state. While it was tempting to try out another routing library, I think for now it's better to use dumb vanilla Go routing. At least until we decide which URL format we intend to standardize on. Change-Id: Ica3da135d05f8ab8fc206f51eeca4f684f8efa0e
25 lines
723 B
Go
25 lines
723 B
Go
// Copyright 2013 Prometheus Team
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
package http_utils
|
|
|
|
import (
|
|
"net/http"
|
|
"net/url"
|
|
)
|
|
|
|
func GetQueryParams(r *http.Request) url.Values {
|
|
r.ParseForm()
|
|
return r.Form
|
|
}
|