Skip to content

Release v0.2.0

Choose a tag to compare

@github-actions github-actions released this 06 Oct 10:19
4ad859e

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)