guix_mirror_bot pushed a commit to branch go-team
in repository guix.

commit 04767266d19f8a5e4eff128a0b5af9c2855047b4
Author: Sharlatan Hellseher <sharlata...@gmail.com>
AuthorDate: Tue Jun 10 22:27:52 2025 +0100

    gnu: Add go-github-com-slok-go-http-metrics.
    
    * gnu/packages/golang-web.scm (go-github-com-slok-go-http-metrics): New 
variable.
    
    Change-Id: I0b747593d7161729a4b85655e3e9a8e1a1bc7257
---
 gnu/packages/golang-web.scm | 50 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/gnu/packages/golang-web.scm b/gnu/packages/golang-web.scm
index 347d87fe43..2649f53995 100644
--- a/gnu/packages/golang-web.scm
+++ b/gnu/packages/golang-web.scm
@@ -9014,6 +9014,56 @@ use gzip compression when serving HTTP requests.")
 provided @code{http.FileSystem}.")
     (license license:expat)))
 
+(define-public go-github-com-slok-go-http-metrics
+  (package
+    (name "go-github-com-slok-go-http-metrics")
+    (version "0.13.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/slok/go-http-metrics";)
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1lrnf0vhqlnhad6n8yyc2iafqlw6jr55cmyg9gqns2yi2gdfqv8m"))))
+    (build-system go-build-system)
+    (arguments
+     (list
+      #:import-path "github.com/slok/go-http-metrics"
+      ;; XXX: Full tests require Iris package.
+      #:test-subdirs #~(list "metrics/...")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'remove-examples
+            (lambda* (#:key tests? import-path #:allow-other-keys)
+              (with-directory-excursion (string-append "src/" import-path)
+                (delete-file-recursively "examples")))))))
+    (propagated-inputs
+     (list go-contrib-go-opencensus-io-exporter-prometheus
+           go-github-com-emicklei-go-restful-v3
+           go-github-com-fasthttp-router
+           go-github-com-gin-gonic-gin
+           go-github-com-go-chi-chi-v5
+           go-github-com-gorilla-mux
+           go-github-com-julienschmidt-httprouter
+           go-github-com-justinas-alice
+           ;; go-github-com-kataras-iris-v12
+           go-github-com-labstack-echo-v4
+           go-github-com-prometheus-client-golang
+           go-github-com-stretchr-testify
+           go-github-com-urfave-negroni
+           go-github-com-valyala-fasthttp
+           go-go-opencensus-io
+           go-goji-io))
+    (home-page "https://github.com/slok/go-http-metrics";)
+    (synopsis "Modular http middleware to measure HTTP requests")
+    (description
+     "Package gohttpmetrics knows how to measure http metrics in different
+metric formats, it comes with a middleware that can be used for different
+frameworks and also the the main Go net/http handler:.")
+    (license license:asl2.0)))
+
 (define-public go-github-com-sourcegraph-jsonrpc2
   (package
     (name "go-github-com-sourcegraph-jsonrpc2")

Reply via email to