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

Design & Implement drivergen

    • 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
    • Labels:
      None
    • Minor Change

      The Core API prototype contained a new tool, called drivergen. This tool read in a Go type and produced an operation implementation from it. We originally chose a Go struct as an IDL with struct tags to indicate how to generate the operation.

      While this worked it was bulky and required extra fields added to the struct to indicate metadata. Additionally, the original design didn't have the driver.Operation type that handled all of the operation execution, including legacy operation execution. The results, which were not originally planned to be generated are of a known complex type, such as a driver.BatchCursor or are simple enough to generate an IDL.

      All this together means we can generate the entire operation. We should swap the Go struct IDL format for a simpler YAML IDL format, which will ensure we can define the operation and its result in a single file. This also allows us to express the necessary information without hacking around Go struct tags.

            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: