You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
before: the dialer (default or user-provided) gets the original dial target (unix:///a/b/c)
the dialer needs to split and find the network type
after: gRPC's default dialer gets network type from address.Attributes
This is a behavior change for user's custom dialers, because they no longer get unix:///a/b/c, and will only get the unix path /a/b/c
The result is, unix:///a/b/c or unix:/a/b/c doesn't work if a custom dialer is specified, because the network type handling in default dialer will be bypassed.
If we're adding a new API, then I don't think we'd want this unless we also did (2). What all does gRPC's dialer do? We have proxy support, and we also detect the network type. Proxies are supposed to be implemented a bit differently, which would make that go away (but cause more backward compatibility problems when we try to make that change). And if the dialer API included the network type, then we wouldn't need to do that anymore, either. So ideally we don't have a "gRPC default dialer" except "net.Dial". Maybe we should more fully flesh out how proxies should work now, though.
register dialers by network types
This would also be a new API. Is this superior to WithDialerV2(func(context.Context, resolver.Address)net.Conn)?
#3890 changed the way "unix" scheme is handled
unix:///a/b/c
)address.Attributes
This is a behavior change for user's custom dialers, because they no longer get
unix:///a/b/c
, and will only get the unix path/a/b/c
The result is,
unix:///a/b/c
orunix:/a/b/c
doesn't work if a custom dialer is specified, because the network type handling in default dialer will be bypassed.Options
context
, so WithContextDialer can handle itWithDialer
API, withresolver.Address
as the address type, instead of stringresolver.Address.NetworkType
, as type stringnet.Dial(addr.NetworkType, addr.Addr)
net.Conn.Close
)The text was updated successfully, but these errors were encountered: