Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-3010

nodejs: expose connection context to handler

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Node.js - Compiler
    • None

    Description

      I want to expose the connection context to the handler functions. I've attached a patch for the JS compiler that accomplishes what I want, but I want to see if anyone else has an opinion on the correct interface.

      My current approach binds a plain javascript object, {{

      { inputProtocol: input, outputProtocol: output }

      }}, to the this._handler.someHandlerFn` so that within the handler function you can use {{this.inputProtocol}" to get access to the inputProtocol, which can in turn be used to get access to the input transport.

      Attachments

        Activity

          People

            Unassigned Unassigned
            andrewdeandrade Andrew de Andrade
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: