|
|
@ -200,6 +200,7 @@ func (s *Service) Close() {
|
|
|
|
|
|
|
|
|
|
|
|
// ServeHTTP allows Service to serve HTTP requests.
|
|
|
|
// ServeHTTP allows Service to serve HTTP requests.
|
|
|
|
func (s *Service) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|
|
|
func (s *Service) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|
|
|
|
|
|
|
w.Header().Set("Content-Type", "application/json; charset=utf-8")
|
|
|
|
s.addBuildVersion(w)
|
|
|
|
s.addBuildVersion(w)
|
|
|
|
|
|
|
|
|
|
|
|
if s.credentialStore != nil {
|
|
|
|
if s.credentialStore != nil {
|
|
|
@ -627,7 +628,6 @@ func queriesValid(queries []string) bool {
|
|
|
|
|
|
|
|
|
|
|
|
// serveExpvar serves registered expvar information over HTTP.
|
|
|
|
// serveExpvar serves registered expvar information over HTTP.
|
|
|
|
func serveExpvar(w http.ResponseWriter, r *http.Request) {
|
|
|
|
func serveExpvar(w http.ResponseWriter, r *http.Request) {
|
|
|
|
w.Header().Set("Content-Type", "application/json; charset=utf-8")
|
|
|
|
|
|
|
|
fmt.Fprintf(w, "{\n")
|
|
|
|
fmt.Fprintf(w, "{\n")
|
|
|
|
first := true
|
|
|
|
first := true
|
|
|
|
expvar.Do(func(kv expvar.KeyValue) {
|
|
|
|
expvar.Do(func(kv expvar.KeyValue) {
|
|
|
|