Go to file
2026-04-23 15:59:41 +08:00
.github/workflows Fix artifact action pins 2026-04-12 19:08:05 +08:00
cmd/billing-service feat: add multi-source billing ingestion (#3) 2026-04-12 13:51:47 +08:00
docs docs: add engineering reference documentation 2026-04-23 15:59:41 +08:00
internal Codex/multi node billing ingestion (#4) 2026-04-12 15:44:42 +08:00
scripts/github-actions Deploy billing-service from build artifact 2026-04-12 19:06:49 +08:00
sql feat: add multi-source billing ingestion (#3) 2026-04-12 13:51:47 +08:00
testdata/postgres feat: add multi-source billing ingestion (#3) 2026-04-12 13:51:47 +08:00
docker-compose.postgres.yml feat(billing): bootstrap billing service 2026-04-09 06:20:30 +08:00
Dockerfile Add billing service container build 2026-04-12 18:46:28 +08:00
go.mod feat(billing): bootstrap billing service 2026-04-09 06:20:30 +08:00
go.sum feat(billing): bootstrap billing service 2026-04-09 06:20:30 +08:00
README.md docs: add engineering reference documentation 2026-04-23 15:59:41 +08:00

billing-service

billing-service is the v1 minute-delta and replay-safe writer for the Cloud Network Billing & Control Plane.

It pulls windowed normalized snapshots from one or more xray-exporter sources, computes deltas from cumulative counters, and writes idempotent usage and billing facts into the existing accounts.svc.plus PostgreSQL schema.

Endpoints

  • GET /api/ping
  • POST /v1/jobs/collect-and-rate
  • POST /v1/jobs/reconcile
  • GET /healthz
  • GET /v1/status

Documentation

  • docs/design.md - current implementation design, main collect-and-rate flow, idempotency rules, and module boundaries
  • docs/reference/ - code-level reference for cmd/ and internal/ packages, including types, interfaces, and functions
  • docs/README.md - documentation index and verification notes
  • docs/architecture.md - deployment and data-flow diagrams
  • docs/api.md - task API surface and upstream/downstream boundaries
  • sql/billing-service-schema.sql - bootstrap/reference DDL aligned with the current accounts.svc.plus accounting schema