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

Update topology.Server type

    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 topology.Server type will require the following changes:

      • Remove the context.Context argument from Connect, since it's not actually used
      • Move the topo parameter from the NewServer method to the Connect method
        • This is necessary because Disconnect sets this to nil. If we can't reset it then a Server can no longer be connected usefully after it is disconnected
      • Rename Connection to ConnectionLegacy
      • Add a new method Connection that implements the Connection method of the driver.Server interface
      • Make Server implement driver.ErrorProcessor to handle SDAM errors.
      • Update Server to use topology.pool and return topology.Connection from Server.Connection and topology.connectionLegacy from Server.ConnectionLegacy.
      • Implement a semaphore for max connections.
        • This used to be contained in the connection.Pool implementation, but it's simpler to have the topology.Server type track this now that the pool is a private type within the topology package.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kris.brandow Kristofer Brandow (Inactive)
              Reporter:
              kris.brandow Kristofer Brandow (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: