mirror of
https://github.com/ClusterCockpit/cc-metric-store.git
synced 2026-02-02 01:31:46 +01:00
Port to newest cclib. Use metricstore as library.
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
// Copyright (C) NHR@FAU, University Erlangen-Nuremberg.
|
||||
// All rights reserved.
|
||||
// All rights reserved. This file is part of cc-metric-store.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package api
|
||||
|
||||
import (
|
||||
@@ -21,29 +22,29 @@ func MountRoutes(r *http.ServeMux) {
|
||||
}
|
||||
publicKey := ed25519.PublicKey(buf)
|
||||
// Compatibility
|
||||
r.Handle("POST /api/free", authHandler(http.HandlerFunc(handleFree), publicKey))
|
||||
r.Handle("POST /api/write", authHandler(http.HandlerFunc(handleWrite), publicKey))
|
||||
r.Handle("POST /api/free", authHandler(http.HandlerFunc(freeMetrics), publicKey))
|
||||
r.Handle("POST /api/write", authHandler(http.HandlerFunc(writeMetrics), publicKey))
|
||||
r.Handle("GET /api/query", authHandler(http.HandlerFunc(handleQuery), publicKey))
|
||||
r.Handle("GET /api/debug", authHandler(http.HandlerFunc(handleDebug), publicKey))
|
||||
r.Handle("GET /api/healthcheck", authHandler(http.HandlerFunc(handleHealthCheck), publicKey))
|
||||
r.Handle("GET /api/debug", authHandler(http.HandlerFunc(debugMetrics), publicKey))
|
||||
r.Handle("GET /api/healthcheck", authHandler(http.HandlerFunc(metricsHealth), publicKey))
|
||||
// Refactor
|
||||
r.Handle("POST /api/free/", authHandler(http.HandlerFunc(handleFree), publicKey))
|
||||
r.Handle("POST /api/write/", authHandler(http.HandlerFunc(handleWrite), publicKey))
|
||||
r.Handle("POST /api/free/", authHandler(http.HandlerFunc(freeMetrics), publicKey))
|
||||
r.Handle("POST /api/write/", authHandler(http.HandlerFunc(writeMetrics), publicKey))
|
||||
r.Handle("GET /api/query/", authHandler(http.HandlerFunc(handleQuery), publicKey))
|
||||
r.Handle("GET /api/debug/", authHandler(http.HandlerFunc(handleDebug), publicKey))
|
||||
r.Handle("GET /api/healthcheck/", authHandler(http.HandlerFunc(handleHealthCheck), publicKey))
|
||||
r.Handle("GET /api/debug/", authHandler(http.HandlerFunc(debugMetrics), publicKey))
|
||||
r.Handle("GET /api/healthcheck/", authHandler(http.HandlerFunc(metricsHealth), publicKey))
|
||||
} else {
|
||||
// Compatibility
|
||||
r.HandleFunc("POST /api/free", handleFree)
|
||||
r.HandleFunc("POST /api/write", handleWrite)
|
||||
r.HandleFunc("POST /api/free", freeMetrics)
|
||||
r.HandleFunc("POST /api/write", writeMetrics)
|
||||
r.HandleFunc("GET /api/query", handleQuery)
|
||||
r.HandleFunc("GET /api/debug", handleDebug)
|
||||
r.HandleFunc("GET /api/healthcheck", handleHealthCheck)
|
||||
r.HandleFunc("GET /api/debug", debugMetrics)
|
||||
r.HandleFunc("GET /api/healthcheck", metricsHealth)
|
||||
// Refactor
|
||||
r.HandleFunc("POST /api/free/", handleFree)
|
||||
r.HandleFunc("POST /api/write/", handleWrite)
|
||||
r.HandleFunc("POST /api/free/", freeMetrics)
|
||||
r.HandleFunc("POST /api/write/", writeMetrics)
|
||||
r.HandleFunc("GET /api/query/", handleQuery)
|
||||
r.HandleFunc("GET /api/debug/", handleDebug)
|
||||
r.HandleFunc("GET /api/healthcheck/", handleHealthCheck)
|
||||
r.HandleFunc("GET /api/debug/", debugMetrics)
|
||||
r.HandleFunc("GET /api/healthcheck/", metricsHealth)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user