File: 0003-Wrap-prometheus-sigv4-package.patch

package info (click to toggle)
golang-github-prometheus-common 0.63.0-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, sid
  • size: 1,424 kB
  • sloc: makefile: 20; sh: 7
file content (35 lines) | stat: -rw-r--r-- 976 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
From: Daniel Swarbrick <dswarbrick@debian.org>
Date: Wed, 12 Feb 2025 16:13:41 +0100
Subject: Wrap prometheus/sigv4 package

Forwarded: not-needed
Last-Update: 2025-02-16

Some downstream dependencies still import prometheus/common/sigv4, which
has been moved by upstream into its own repo (github.com/prometheus/sigv4)
and is packaged separately as golang-github-prometheus-sigv4. This patch
provides a type alias / thin wrapper for backwards compatibility.
---
 sigv4/sigv4.go | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 sigv4/sigv4.go

diff --git a/sigv4/sigv4.go b/sigv4/sigv4.go
new file mode 100644
index 0000000..1159c1e
--- /dev/null
+++ b/sigv4/sigv4.go
@@ -0,0 +1,13 @@
+package sigv4
+
+import (
+	"net/http"
+
+	"github.com/prometheus/sigv4"
+)
+
+type SigV4Config = sigv4.SigV4Config
+
+func NewSigV4RoundTripper(cfg *SigV4Config, next http.RoundTripper) (http.RoundTripper, error) {
+	return sigv4.NewSigV4RoundTripper(cfg, next)
+}