Client is a reusable, concurrency-safe client for a single procedure. Depending on the procedure's type, use the CallUnary, CallClientStream, CallServerStream, or CallBidiStream method. By default, clients use the Connect protocol with the binary Protobuf Codec, ask for gzipped responses, and send
| 32 | // ask for gzipped responses, and send uncompressed requests. To use the gRPC |
| 33 | // or gRPC-Web protocols, use the [WithGRPC] or [WithGRPCWeb] options. |
| 34 | type Client[Req, Res any] struct { |
| 35 | config *clientConfig |
| 36 | callUnary func(context.Context, *Request[Req]) (*Response[Res], error) |
| 37 | protocolClient protocolClient |
| 38 | err error |
| 39 | } |
| 40 | |
| 41 | // NewClient constructs a new Client. |
| 42 | func NewClient[Req, Res any](httpClient HTTPClient, url string, options ...ClientOption) *Client[Req, Res] { |
nothing calls this directly
no outgoing calls
no test coverage detected