gRPC Reflection Source
GripMock can load API descriptors directly from a running gRPC server via reflection.
Basic usage
Use an insecure endpoint:
bash
gripmock grpc://localhost:50051Use a TLS endpoint:
bash
gripmock grpcs://api.company.local:443With stubs:
bash
gripmock --stub ./stubs grpc://localhost:50051URL format
grpc://host:port-> no TLSgrpcs://host:port-> TLS
GripMock reads descriptors from reflection API and then starts mock services from those descriptors.
Query parameters
Supported query parameters:
timeout(default:5s)bearer(Authorization token)serverName(TLS server name override, mostly forgrpcs://)
Examples:
bash
# Timeout
gripmock grpc://localhost:50051?timeout=10s
# Bearer token
gripmock grpc://localhost:50051?bearer=my-token
# TLS + SNI override
gripmock grpcs://10.0.0.5:8443?serverName=api.company.localRequirements on target server
Target gRPC server must:
- Expose gRPC reflection (
grpc.reflection.v1). - Be reachable from GripMock process.
If reflection is disabled, GripMock cannot load descriptors from this source.
Notes
- Reflection and health services are skipped when building descriptor set.
beareris sent asAuthorization: Bearer <token>.- Minimal phase: no custom CA/mTLS/authority flags yet.