mirror of
https://github.com/J3vb/OwnCord.git
synced 2026-09-03 03:50:00 +03:00
- Generate Server/db/dbgen/{events,plugins}.sql.go and full Server/db/pgdbgen/ (//go:build postgres gated)
- Implement PostgresStore EventStore and PluginStore methods in store/postgres.go
- Wire plugin host_events.go EventSink into hub broadcast path (SetPluginEventSink)
- Wire host_commands.go slash-command dispatcher: chat_command V1 handler + hub.SetPluginRegistry
- Add handlers_command.go + handlers_command_test.go for plugin slash-command dispatch
- Add reconnect_db_test.go: TestReconnect_BufferMiss_FallsBackToDBTier (cold-tier DB replay)
- Add otel-up/otel-down Makefile targets; docker-compose.otel.yml + prometheus.dev.yml
- Update PHASE_BC_LOCAL_TODO.md: mark in-session items complete; document remaining network-blocked steps
- Minor fixes: channel_handler access-control, router plugin handler wiring, service span instrumentation
37 lines
1.2 KiB
Makefile
37 lines
1.2 KiB
Makefile
# OwnCord Server — developer convenience targets
|
|
#
|
|
# sqlc-generate Regenerate type-safe Go for both the sqlite and postgres
|
|
# engines defined in sqlc.yaml (db/dbgen + db/pgdbgen).
|
|
# sqlc-verify Fail if either committed dbgen output is stale (used by CI).
|
|
# sqlc-install Install the pinned sqlc version into $GOBIN.
|
|
# otel-up Start Jaeger + Prometheus for local tracing development.
|
|
# otel-down Stop and remove the OTel dev containers.
|
|
|
|
SQLC_VERSION := $(shell cat sqlc.version)
|
|
|
|
.PHONY: sqlc-install sqlc-generate sqlc-verify otel-up otel-down
|
|
|
|
sqlc-install:
|
|
go install github.com/sqlc-dev/sqlc/cmd/sqlc@$(SQLC_VERSION)
|
|
|
|
sqlc-generate:
|
|
sqlc generate
|
|
|
|
sqlc-verify:
|
|
sqlc generate
|
|
@git diff --exit-code db/dbgen db/pgdbgen || ( \
|
|
echo "ERROR: generated sqlc output is stale. Run 'make sqlc-generate' and commit the result." ; \
|
|
exit 1 ; \
|
|
)
|
|
|
|
# Phase B Step 8 — local OTel development stack.
|
|
# Starts Jaeger (traces) and Prometheus (metrics) in Docker.
|
|
# Jaeger UI: http://localhost:16686
|
|
# Prometheus UI: http://localhost:9090
|
|
# Run the server with: go build -tags otel . && ./owncord-server
|
|
otel-up:
|
|
docker compose -f docker-compose.otel.yml up -d
|
|
|
|
otel-down:
|
|
docker compose -f docker-compose.otel.yml down
|