feat(driver): gRPC driver (v1.1.0)#170
Merged
Merged
Conversation
- New `type: grpc` driver executing unary gRPC calls via server reflection; no .proto files required at runtime - URL format: grpc://host:port/Service/Method (plain) or grpcs:// (TLS) - JSON body unmarshalled to protobuf via the reflection API - gRPC status codes mapped to HTTP-like codes for uniform error classifier and backoff behaviour (ResourceExhausted→429, Unavailable→503, etc.) - Connections and method descriptors cached per address+TLS mode - GRPCConfig added to TargetConfig and TargetDefaultsConfig (body, timeout_s, tls, insecure) - grpc added to valid types in config validation and targets_file parser - 10 driver tests covering: status mapping, health check, empty body, connection reuse, NOT_FOUND mapping, unknown method, no reflection, invalid URL, cancelled context, status FromError integration - Docs: grpc section in drivers.md with status code table; grpc fields in configuration.md; 2 new deps in dependencies.md; _index.md updated - Dependencies: google.golang.org/grpc v1.79.3 (Apache-2.0), google.golang.org/genproto/googleapis/rpc (Apache-2.0) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
grpc_reflection_v1alpha is deprecated at the proto-file level; staticcheck flags any use of it. The v1 API is identical from the client's perspective. Also drops ErrorCode from the error message — v1 ErrorResponse uses google.rpc.Code, not int32. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
type: grpcdriver for generating gRPC traffic — the first non-HTTP protocol from the v1.1.0 milestone..protofiles required — uses server reflection to discover request/response types at runtime, then marshals the JSON body to protobuf automaticallygrpc://host:port/Service/Method(plaintext),grpcs://(TLS)grpc.body,grpc.timeout_s,grpc.tls,grpc.insecureonTargetConfigandTargetDefaultsConfigConfig example
Test plan
go test -race ./...)go vet ./...cleangofmt -sclean🤖 Generated with Claude Code