Documentation
¶
Overview ¶
Package grpc implements a protocol.Protocol driver for gRPC.
VegaLoad has no compiled proto stubs for whatever service a scenario targets — asking an author to generate and vendor them just to load test a service would fight the "every test is a file" principle in AGENTS.md. Instead this driver sends target.Body as an already-encoded message verbatim and hands back the response the same way, using a pass-through codec instead of protobuf's. The scripting layer (built later in Phase 0) is what will give a scenario author a convenient way to produce those bytes; this driver only needs to move them.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver is a gRPC protocol.Protocol. It dials once in New and reuses the same *grpc.ClientConn (and the HTTP/2 connection underneath it) across every call to Do.
func New ¶
New returns a ready-to-use Driver for target. target.URL is a bare "host:port", or "grpc://host:port" for the same thing written explicitly, or "grpcs://host:port" to dial over TLS. target.Method must be set to the full RPC method (e.g. "/package.Service/Method") — unlike the HTTP drivers there is no sensible default. timeout bounds each individual call.
New returns an error for anything that is a configuration problem (a missing Method, an unparseable target, an unsupported scheme) — never for the target being unreachable, which Do reports per call instead, since dialing is lazy.