When dialing a gRPC endpoint, normally a client can provide arbitrary dial options. Ondatra currently has a use case for providing a custom unary and stream interceptor, for example. GRPCTransport could in theory provide setters for all DialOptions that currently exist but that would bloat the API and would incur the burden of keeping it up to date when new dial options are added. I'd suggest a simple SetDialOptions(...grpc.DialOption) method be added. Whether or not you still want to keep SetDialTimeout or leave it up to the user to set it via a dial option is up to you. If both SetDialTimeout and SetDialOptions are available, then some reasonable semantics for when both are set would need to be decided.
When dialing a gRPC endpoint, normally a client can provide arbitrary dial options. Ondatra currently has a use case for providing a custom unary and stream interceptor, for example.
GRPCTransport
could in theory provide setters for allDialOptions
that currently exist but that would bloat the API and would incur the burden of keeping it up to date when new dial options are added. I'd suggest a simpleSetDialOptions(...grpc.DialOption)
method be added. Whether or not you still want to keepSetDialTimeout
or leave it up to the user to set it via a dial option is up to you. If bothSetDialTimeout
andSetDialOptions
are available, then some reasonable semantics for when both are set would need to be decided.