Skip to content

gRPC Server

The engine ships as a standalone gRPC server (DiffEngine service, port 50051) for programmatic use.

Run with Docker

sh
docker build -t drift-guard-engine .
docker run -p 50051:50051 drift-guard-engine

Override the port via the PORT environment variable:

sh
docker run -e PORT=9090 -p 9090:9090 drift-guard-engine

Proto API

protobuf
service DiffEngine {
  rpc Diff(DiffRequest) returns (DiffResponse);
}

DiffRequest fields

FieldTypeDescription
base_contentbytesRaw content of the base schema file
head_contentbytesRaw content of the head schema file
base_namestringOriginal filename (used for extension-based type detection)
head_namestringOriginal filename of the head file
typestringExplicit schema type: openapi, graphql, or grpc. Auto-detected from base_name extension if omitted.

The proto definition lives at api/drift-guard/v1/drift-guard.proto.

Released under the MIT License.