Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-1209

Create LocalAddresser interface and make topology.Connection implement it

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1.0
    • Component/s: Core API
    • Labels:
      None

      Description

      The BI Connector uses the local address of a Connection to filter current operations on the server. The new Connection interface does not provide access to the underlying net.Conn's local address. This ticket should add a LocalAddresser interface to the driver package that has a LocalAddress() method. It can return a net.Addr or a string; the BIC only needs the address as a string:

      c, err := server.Connection(ctx)
      connAddrs = append(connAddrs, c.LocalAddr().String())
      

      so returning a string directly is fine (we would just skip the trailing .String() call).

      The old version of the go driver used by BI Connector had a LocalAddr method on the Connection type that returned a net.Addr which was just the underlying net.Conn's LocalAddr() result.

        Attachments

          Activity

            People

            Assignee:
            manny.eppinger Emmanuel Eppinger (Inactive)
            Reporter:
            matthew.chiaravalloti Matthew Chiaravalloti
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: