Upgraded go-ecoflow library

This commit is contained in:
tess1o
2024-07-14 16:40:30 +03:00
parent 18268b9c4a
commit 11a74cb78a
3 changed files with 3 additions and 4 deletions

2
go.mod
View File

@@ -8,7 +8,7 @@ require (
github.com/golang-migrate/migrate/v4 v4.17.1
github.com/jackc/pgx/v5 v5.6.0
github.com/prometheus/client_golang v1.19.1
github.com/tess1o/go-ecoflow v1.0.2-0.20240714074819-59ff210be534
github.com/tess1o/go-ecoflow v1.1.0
)
require (

2
go.sum
View File

@@ -87,6 +87,8 @@ github.com/tess1o/go-ecoflow v1.0.2-0.20240713193411-8210ee84f18c h1:XR2CJD2ehra
github.com/tess1o/go-ecoflow v1.0.2-0.20240713193411-8210ee84f18c/go.mod h1:kqrfk4Y14pHCPKIwp6o7ZbgpohUzQHh7EMX+RUA4JCU=
github.com/tess1o/go-ecoflow v1.0.2-0.20240714074819-59ff210be534 h1:Zd0sbBe5zGWrWz18g5Pfaok5z5yu8br0xTlXpXUTooQ=
github.com/tess1o/go-ecoflow v1.0.2-0.20240714074819-59ff210be534/go.mod h1:kqrfk4Y14pHCPKIwp6o7ZbgpohUzQHh7EMX+RUA4JCU=
github.com/tess1o/go-ecoflow v1.1.0 h1:WCseMmKNdxRMn219ws5Osi5gb8QWdGpw5SqUQ/v7Ipo=
github.com/tess1o/go-ecoflow v1.1.0/go.mod h1:kqrfk4Y14pHCPKIwp6o7ZbgpohUzQHh7EMX+RUA4JCU=
go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw=
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30=

View File

@@ -54,11 +54,9 @@ func main() {
setLoggerLevel()
slog.Info("Starting the exporter...")
metricPrefix := getStringOrDefault("METRIC_PREFIX", defaultMetricPrefix)
var handlers []MetricHandler
handlers = enablePrometheus(metricPrefix, handlers)
handlers = enableTimescaleDb(metricPrefix, handlers)
handlers = enableRedis(metricPrefix, handlers)
@@ -74,7 +72,6 @@ func main() {
setupGracefulShutdown(handlers, done)
exporterType := getStringOrDefault("EXPORTER_TYPE", defaultExporterType)
switch exporterType {
case "rest":
err := createAndStartRestExporter(handlers)