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
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Added
Connection lifecycle hooks: WithOnConnected and WithOnDisconnected register ConnectionHook callbacks that receive a ConnectionEvent (generation, connection ID, selected address and cause) on every connect, reconnect and close. Hooks run on a client-owned dispatcher in transition order, never delay reconnects, contain panics and always pair a delivered Connected with exactly one Disconnected, including on Close (part of #62)
Custom load balancing: WithLoadBalancer accepts your own LoadBalancer that picks the endpoint for every connection attempt, including SRV-discovered candidates. A failed selection returns *LoadBalancerError and is retried with the normal reconnect backoff. The client borrows the balancer and never closes it, and rejects it when combined with a loadBalancer= connection-string option or WithGRPCConnection (part of #62)