From a11573609ed74a5ff014dc31bae511d350c99f20 Mon Sep 17 00:00:00 2001 From: Klagarge Date: Thu, 30 Apr 2026 17:42:27 +0200 Subject: [PATCH] refactor(db): move package Signed-off-by: Klagarge --- db/src/influx/{influx_gateway.go => influx.go} | 15 +++++++-------- db/src/mqtt/{mqtt_gateway.go => mqtt.go} | 2 +- 2 files changed, 8 insertions(+), 9 deletions(-) rename db/src/influx/{influx_gateway.go => influx.go} (92%) rename db/src/mqtt/{mqtt_gateway.go => mqtt.go} (99%) diff --git a/db/src/influx/influx_gateway.go b/db/src/influx/influx.go similarity index 92% rename from db/src/influx/influx_gateway.go rename to db/src/influx/influx.go index edd193b..411d0b6 100644 --- a/db/src/influx/influx_gateway.go +++ b/db/src/influx/influx.go @@ -1,5 +1,5 @@ // Package influx_gateway_Lib provides an abstraction to the client influx. -package influx_gateway +package influx import ( "context" @@ -41,13 +41,12 @@ func NewInfluxGateway(url string, token string, database string) (*InfluxGateway } return &InfluxGateway{ - client: client, - batcher: batching.NewBatcher( - batching.WithSize(BatchSize), - batching.WithInitialCapacity(BatchCapacity), - ), - }, - nil + client: client, + batcher: batching.NewBatcher( + batching.WithSize(BatchSize), + batching.WithInitialCapacity(BatchCapacity), + ), + }, nil } // AddDatapoint is used to add a datapoint in the batcher. It uses the diff --git a/db/src/mqtt/mqtt_gateway.go b/db/src/mqtt/mqtt.go similarity index 99% rename from db/src/mqtt/mqtt_gateway.go rename to db/src/mqtt/mqtt.go index 631d213..fbca826 100644 --- a/db/src/mqtt/mqtt_gateway.go +++ b/db/src/mqtt/mqtt.go @@ -1,5 +1,5 @@ // Package mqtt_gateway provides an abstraction to an MQTT broker client. -package mqtt_gateway +package mqtt import ( "crypto/tls"