Files
cloud-services/services/gateway/README.md

1.0 KiB

Gateway Service

WebSocket API gateway for vehicle (TRex), HMI, and mobile app connections.

What it does

  • Authenticates WebSocket connections via JWT
  • Routes messages to Kafka topics
  • Manages connection state in Redis
  • Serves Swagger docs

Ports

Port Purpose
8077 HTTP/WebSocket
11011 Health check

WebSocket Endpoints

  • /ws/trex - Vehicle connections
  • /ws/hmi - HMI connections
  • /ws/mobile - Mobile app connections

Build

# Local
go build .

# Docker
docker build -t gateway -f Dockerfile ../..

Run

# Required env vars
export KAFKA_HOSTS=localhost:9092
export REDIS_HOST=localhost
export JWK_URL=https://keycloak.example.com/realms/consumer/protocol/openid-connect/certs

./gateway

Configuration

See deploy/base/configmap-common.yaml for all options.

Key settings:

  • KAFKA_HOSTS - Kafka bootstrap servers
  • REDIS_HOST/PORT - Redis for session state
  • JWK_URL - JWKS endpoint for JWT validation
  • LOG_LEVEL - debug, info, warn, error