Skip to content

Commit

Permalink
new package: promquery
Browse files Browse the repository at this point in the history
This implementation originated in Limes and spread into Castellum. It's
time to deduplicate it.
  • Loading branch information
majewsky committed Jan 17, 2023
1 parent a47ac42 commit abde8c2
Show file tree
Hide file tree
Showing 6 changed files with 287 additions and 417 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ reusability. Feel free to add to this.
* [must](./must) contains convenience functions for quickly exiting on fatal errors without the need for excessive `if err != nil`.
* [osext](./osext) contains extensions to the standard library package "os", mostly relating to parsing of environment variables.
* [pluggable](./pluggable) is a tiny plugin factory library, for constructing different objects implementing a common interface based on a configurable type selector.
* [promquery](./promquery) provides a simplified interface for executing Prometheus queries.
* [respondwith](./respondwith) contains some helper functions for generating responses in HTTP handlers.
* [secrets](./secrets) provides convenience functions for working with auth credentials.
* [sre](./sre) contains a HTTP middleware that emits SRE-related Prometheus metrics.
Expand Down
9 changes: 6 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ require (
github.com/hashicorp/golang-lru/v2 v2.0.1
github.com/lib/pq v1.10.7
github.com/prometheus/client_golang v1.14.0
github.com/prometheus/common v0.39.0
github.com/rabbitmq/amqp091-go v1.5.0
github.com/sapcc/go-api-declarations v1.4.2
github.com/sergi/go-diff v1.2.0
Expand All @@ -23,10 +24,12 @@ require (
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
golang.org/x/sys v0.3.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
)
Loading

0 comments on commit abde8c2

Please sign in to comment.