Skip to content

Gateway Quickstart

Start basic gateway
qql-go serve --qdrant-url http://localhost:6334

Transparent QQL proxy. Any query passes through.

Test it:

Test with curl
curl -X POST http://localhost:50051/qql.QQL/Exec
-H "Content-Type: application/json"
-d '{"query": "SHOW COLLECTIONS"}'

Health check:

Health check
curl http://localhost:50051/health
{"ok":true,"version":"X.Y.Z"}Section titled “{"ok":true,"version":"X.Y.Z"}”

Start gateway with JWT auth
qql-go serve
--qdrant-url http://localhost:6334
--jwks-url https://idp.example.com/.well-known/jwks.json
--jwt-issuer https://idp.example.com
--jwt-audience my-app
--tenant-claim org_id
--role-claim role

Start full gateway
qql-go serve
--qdrant-url http://localhost:6334
--jwks-url https://idp.example.com/.well-known/jwks.json
--jwt-issuer https://idp.example.com
--jwt-audience my-app
--tenant-claim org_id
--role-claim role
--policy-file policies.yaml
--policy-reload
--audit
--audit-file audit.jsonl
--rate-limit 100
--rate-limit-capacity 20

Start gateway with embeddings
qql-go serve
--qdrant-url http://localhost:6334
--inference-mode local
--embedding-endpoint http://127.0.0.1:1234/v1/embeddings
--embedding-model text-embedding-all-minilm-l6-v2-embedding
--embedding-dimension 384

import (
"github.com/srimon12/qql-go/server"
"github.com/srimon12/qql-go/internal/config"
)
server.Run(server.Config{
ListenAddr: ":50051",
QdrantURL: "http://localhost:6334",
QQLConfig: &config.Config{InferenceMode: "cloud"},
Gateway: &server.GatewayConfig{
JWTValidator: server.NewJWTValidator(server.JWKSConfig{
JWKSURL: "https://idp.example.com/.well-known/jwks.json",
}),
PolicyEngine: pe,
Audit: server.NewAuditLogger(nil, true),
},
})

The gateway listens on :50051 by default. Change with --listen:

Custom port
qql-go serve --listen :8080 --qdrant-url http://localhost:6334