Skip to content

Commit 23b6abf

Browse files
(Dashboard) Feature: Builds Routes (#2006)
1 parent d938209 commit 23b6abf

File tree

16 files changed

+1843
-10
lines changed

16 files changed

+1843
-10
lines changed

packages/dashboard-api/Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ else
1010
IMAGE_REGISTRY := $(GCP_REGION)-docker.pkg.dev/$(GCP_PROJECT_ID)/$(PREFIX)core/dashboard-api
1111
endif
1212

13+
HOSTNAME := $(shell hostname 2> /dev/null || hostnamectl hostname 2> /dev/null)
14+
$(if $(HOSTNAME),,$(error Failed to determine hostname: both 'hostname' and 'hostnamectl' failed))
15+
1316
.PHONY: generate
1417
generate:
1518
go generate ./...
@@ -32,6 +35,11 @@ run:
3235
make build
3336
./bin/dashboard-api
3437

38+
.PHONY: run-local
39+
run-local:
40+
make build
41+
NODE_ID=$(HOSTNAME) ./bin/dashboard-api
42+
3543
.PHONY: test
3644
test:
3745
go test -race -v ./...

packages/dashboard-api/go.mod

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ require (
2020
github.com/gin-contrib/cors v1.7.6
2121
github.com/gin-gonic/gin v1.10.1
2222
github.com/google/uuid v1.6.0
23+
github.com/jackc/pgx/v5 v5.7.5
2324
github.com/oapi-codegen/gin-middleware v1.0.2
25+
github.com/oapi-codegen/runtime v1.1.1
2426
go.uber.org/zap v1.27.1
2527
)
2628

@@ -31,6 +33,7 @@ require (
3133
github.com/ClickHouse/clickhouse-go/v2 v2.40.1 // indirect
3234
github.com/Microsoft/go-winio v0.6.2 // indirect
3335
github.com/andybalholm/brotli v1.2.0 // indirect
36+
github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect
3437
github.com/bsm/redislock v0.9.4 // indirect
3538
github.com/bytedance/sonic v1.13.3 // indirect
3639
github.com/bytedance/sonic/loader v0.2.4 // indirect
@@ -72,7 +75,6 @@ require (
7275
github.com/jackc/pgerrcode v0.0.0-20250907135507-afb5586c32a6 // indirect
7376
github.com/jackc/pgpassfile v1.0.0 // indirect
7477
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
75-
github.com/jackc/pgx/v5 v5.7.5 // indirect
7678
github.com/jackc/puddle/v2 v2.2.2 // indirect
7779
github.com/jellydator/ttlcache/v3 v3.4.0 // indirect
7880
github.com/josharian/intern v1.0.0 // indirect

packages/dashboard-api/go.sum

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)