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

Update topology.Server type

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

      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.

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

              Created:
              Updated:
              Resolved: