Skip to content

Commit

Permalink
refactor: Move sqlite2 into top level package
Browse files Browse the repository at this point in the history
Signed-off-by: Mahendra Paipuri <[email protected]>
  • Loading branch information
mahendrapaipuri committed Jul 13, 2024
1 parent 83996ff commit 930d65d
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ endif
PROMU_TEST_CONF ?= .promu-go-test.yml
ifeq ($(CGO_BUILD), 1)
PROMU_CONF ?= .promu-cgo.yml
pkgs := ./pkg/api/cli \
pkgs := ./pkg/sqlite3 ./pkg/api/cli \
./pkg/api/db ./pkg/api/helper \
./pkg/api/resource ./pkg/api/resource/slurm \
./pkg/api/updater ./pkg/api/db/sqlite3 \
./pkg/api/updater \
./pkg/api/http ./cmd/ceems_api_server \
./pkg/lb/backend ./pkg/lb/cli \
./pkg/lb/frontend ./pkg/lb/serverpool \
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ import (
"github.com/go-kit/log/level"
"github.com/mahendrapaipuri/ceems/internal/common"
"github.com/mahendrapaipuri/ceems/pkg/api/base"
ceems_sqlite3 "github.com/mahendrapaipuri/ceems/pkg/api/db/sqlite3"
"github.com/mahendrapaipuri/ceems/pkg/api/models"
"github.com/mahendrapaipuri/ceems/pkg/api/resource"
"github.com/mahendrapaipuri/ceems/pkg/api/updater"
"github.com/mahendrapaipuri/ceems/pkg/grafana"
ceems_sqlite3 "github.com/mahendrapaipuri/ceems/pkg/sqlite3"
"github.com/mattn/go-sqlite3"
"github.com/prometheus/common/model"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/db/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/mahendrapaipuri/ceems/pkg/api/base"
ceems_sqlite3 "github.com/mahendrapaipuri/ceems/pkg/api/db/sqlite3"
ceems_sqlite3 "github.com/mahendrapaipuri/ceems/pkg/sqlite3"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/http/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import (
"github.com/mahendrapaipuri/ceems/internal/common"
"github.com/mahendrapaipuri/ceems/pkg/api/base"
"github.com/mahendrapaipuri/ceems/pkg/api/db"
"github.com/mahendrapaipuri/ceems/pkg/api/db/sqlite3"
"github.com/mahendrapaipuri/ceems/pkg/api/http/docs"
"github.com/mahendrapaipuri/ceems/pkg/api/models"
"github.com/mahendrapaipuri/ceems/pkg/sqlite3"
"github.com/prometheus/common/config"
"github.com/prometheus/common/model"
"github.com/prometheus/exporter-toolkit/web"
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/db/sqlite3/sqlite3.go → pkg/sqlite3/sqlite3.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ func avgMetricMap(existing, new string, existingWeight, newWeight float64) strin
var metricMaps = []models.MetricMap{existingMetricMap, newMetricMap}
var weights = []float64{existingWeight, newWeight}

// Intialize vars
// Initialize vars
var avgMetricMap = make(models.MetricMap)
var totalWeights = make(map[string]models.JSONFloat)
for imetricMap, metricMap := range metricMaps {
Expand Down
File renamed without changes.

0 comments on commit 930d65d

Please sign in to comment.